123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224 |
- .class Landroid/support/v4/widget/CompoundButtonCompatDonut;
- .super Ljava/lang/Object;
- .source "CompoundButtonCompatDonut.java"
- # static fields
- .field private static final TAG:Ljava/lang/String; = "CompoundButtonCompatDonut"
- .field private static sButtonDrawableField:Ljava/lang/reflect/Field;
- .field private static sButtonDrawableFieldFetched:Z
- # direct methods
- .method constructor <init>()V
- .locals 0
- .prologue
- .line 27
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- return-void
- .end method
- .method static getButtonDrawable(Landroid/widget/CompoundButton;)Landroid/graphics/drawable/Drawable;
- .locals 5
- .param p0, "button" # Landroid/widget/CompoundButton;
- .prologue
- const/4 v2, 0x0
- const/4 v4, 0x1
- .line 61
- sget-boolean v1, Landroid/support/v4/widget/CompoundButtonCompatDonut;->sButtonDrawableFieldFetched:Z
- if-nez v1, :cond_0
- .line 63
- :try_start_0
- const-class v1, Landroid/widget/CompoundButton;
- const-string v3, "mButtonDrawable"
- invoke-virtual {v1, v3}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;
- move-result-object v1
- sput-object v1, Landroid/support/v4/widget/CompoundButtonCompatDonut;->sButtonDrawableField:Ljava/lang/reflect/Field;
- .line 64
- sget-object v1, Landroid/support/v4/widget/CompoundButtonCompatDonut;->sButtonDrawableField:Ljava/lang/reflect/Field;
- const/4 v3, 0x1
- invoke-virtual {v1, v3}, Ljava/lang/reflect/Field;->setAccessible(Z)V
- :try_end_0
- .catch Ljava/lang/NoSuchFieldException; {:try_start_0 .. :try_end_0} :catch_0
- .line 68
- :goto_0
- sput-boolean v4, Landroid/support/v4/widget/CompoundButtonCompatDonut;->sButtonDrawableFieldFetched:Z
- .line 71
- :cond_0
- sget-object v1, Landroid/support/v4/widget/CompoundButtonCompatDonut;->sButtonDrawableField:Ljava/lang/reflect/Field;
- if-eqz v1, :cond_1
- .line 73
- :try_start_1
- sget-object v1, Landroid/support/v4/widget/CompoundButtonCompatDonut;->sButtonDrawableField:Ljava/lang/reflect/Field;
- invoke-virtual {v1, p0}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;
- move-result-object v1
- check-cast v1, Landroid/graphics/drawable/Drawable;
- :try_end_1
- .catch Ljava/lang/IllegalAccessException; {:try_start_1 .. :try_end_1} :catch_1
- .line 79
- :goto_1
- return-object v1
- .line 65
- :catch_0
- move-exception v0
- .line 66
- .local v0, "e":Ljava/lang/NoSuchFieldException;
- const-string v1, "CompoundButtonCompatDonut"
- const-string v3, "Failed to retrieve mButtonDrawable field"
- invoke-static {v1, v3, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
- goto :goto_0
- .line 74
- .end local v0 # "e":Ljava/lang/NoSuchFieldException;
- :catch_1
- move-exception v0
- .line 75
- .local v0, "e":Ljava/lang/IllegalAccessException;
- const-string v1, "CompoundButtonCompatDonut"
- const-string v3, "Failed to get button drawable via reflection"
- invoke-static {v1, v3, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
- .line 76
- sput-object v2, Landroid/support/v4/widget/CompoundButtonCompatDonut;->sButtonDrawableField:Ljava/lang/reflect/Field;
- .end local v0 # "e":Ljava/lang/IllegalAccessException;
- :cond_1
- move-object v1, v2
- .line 79
- goto :goto_1
- .end method
- .method static getButtonTintList(Landroid/widget/CompoundButton;)Landroid/content/res/ColorStateList;
- .locals 1
- .param p0, "button" # Landroid/widget/CompoundButton;
- .prologue
- .line 41
- instance-of v0, p0, Landroid/support/v4/widget/TintableCompoundButton;
- if-eqz v0, :cond_0
- .line 42
- check-cast p0, Landroid/support/v4/widget/TintableCompoundButton;
- .end local p0 # "button":Landroid/widget/CompoundButton;
- invoke-interface {p0}, Landroid/support/v4/widget/TintableCompoundButton;->getSupportButtonTintList()Landroid/content/res/ColorStateList;
- move-result-object v0
- .line 44
- :goto_0
- return-object v0
- .restart local p0 # "button":Landroid/widget/CompoundButton;
- :cond_0
- const/4 v0, 0x0
- goto :goto_0
- .end method
- .method static getButtonTintMode(Landroid/widget/CompoundButton;)Landroid/graphics/PorterDuff$Mode;
- .locals 1
- .param p0, "button" # Landroid/widget/CompoundButton;
- .prologue
- .line 54
- instance-of v0, p0, Landroid/support/v4/widget/TintableCompoundButton;
- if-eqz v0, :cond_0
- .line 55
- check-cast p0, Landroid/support/v4/widget/TintableCompoundButton;
- .end local p0 # "button":Landroid/widget/CompoundButton;
- invoke-interface {p0}, Landroid/support/v4/widget/TintableCompoundButton;->getSupportButtonTintMode()Landroid/graphics/PorterDuff$Mode;
- move-result-object v0
- .line 57
- :goto_0
- return-object v0
- .restart local p0 # "button":Landroid/widget/CompoundButton;
- :cond_0
- const/4 v0, 0x0
- goto :goto_0
- .end method
- .method static setButtonTintList(Landroid/widget/CompoundButton;Landroid/content/res/ColorStateList;)V
- .locals 1
- .param p0, "button" # Landroid/widget/CompoundButton;
- .param p1, "tint" # Landroid/content/res/ColorStateList;
- .prologue
- .line 35
- instance-of v0, p0, Landroid/support/v4/widget/TintableCompoundButton;
- if-eqz v0, :cond_0
- .line 36
- check-cast p0, Landroid/support/v4/widget/TintableCompoundButton;
- .end local p0 # "button":Landroid/widget/CompoundButton;
- invoke-interface {p0, p1}, Landroid/support/v4/widget/TintableCompoundButton;->setSupportButtonTintList(Landroid/content/res/ColorStateList;)V
- .line 38
- :cond_0
- return-void
- .end method
- .method static setButtonTintMode(Landroid/widget/CompoundButton;Landroid/graphics/PorterDuff$Mode;)V
- .locals 1
- .param p0, "button" # Landroid/widget/CompoundButton;
- .param p1, "tintMode" # Landroid/graphics/PorterDuff$Mode;
- .prologue
- .line 48
- instance-of v0, p0, Landroid/support/v4/widget/TintableCompoundButton;
- if-eqz v0, :cond_0
- .line 49
- check-cast p0, Landroid/support/v4/widget/TintableCompoundButton;
- .end local p0 # "button":Landroid/widget/CompoundButton;
- invoke-interface {p0, p1}, Landroid/support/v4/widget/TintableCompoundButton;->setSupportButtonTintMode(Landroid/graphics/PorterDuff$Mode;)V
- .line 51
- :cond_0
- return-void
- .end method
|