362 lines
		
	
	
		
			9.3 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			362 lines
		
	
	
		
			9.3 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class public Lcom/google/android/material/radiobutton/MaterialRadioButton;
 | |
| .super Landroidx/appcompat/widget/AppCompatRadioButton;
 | |
| .source "MaterialRadioButton.java"
 | |
| 
 | |
| 
 | |
| # static fields
 | |
| .field private static final DEF_STYLE_RES:I
 | |
| 
 | |
| .field private static final ENABLED_CHECKED_STATES:[[I
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field private materialThemeColorsTintList:Landroid/content/res/ColorStateList;
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field private useMaterialThemeColors:Z
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public static constructor <clinit>()V
 | |
|     .locals 4
 | |
| 
 | |
|     .line 1
 | |
|     sget v0, Lcom/google/android/material/R$style;->Widget_MaterialComponents_CompoundButton_RadioButton:I
 | |
| 
 | |
|     sput v0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->DEF_STYLE_RES:I
 | |
| 
 | |
|     const/4 v0, 0x4
 | |
| 
 | |
|     new-array v0, v0, [[I
 | |
| 
 | |
|     const/4 v1, 0x2
 | |
| 
 | |
|     new-array v2, v1, [I
 | |
| 
 | |
|     .line 2
 | |
|     fill-array-data v2, :array_0
 | |
| 
 | |
|     const/4 v3, 0x0
 | |
| 
 | |
|     aput-object v2, v0, v3
 | |
| 
 | |
|     new-array v2, v1, [I
 | |
| 
 | |
|     fill-array-data v2, :array_1
 | |
| 
 | |
|     const/4 v3, 0x1
 | |
| 
 | |
|     aput-object v2, v0, v3
 | |
| 
 | |
|     new-array v2, v1, [I
 | |
| 
 | |
|     fill-array-data v2, :array_2
 | |
| 
 | |
|     aput-object v2, v0, v1
 | |
| 
 | |
|     new-array v1, v1, [I
 | |
| 
 | |
|     fill-array-data v1, :array_3
 | |
| 
 | |
|     const/4 v2, 0x3
 | |
| 
 | |
|     aput-object v1, v0, v2
 | |
| 
 | |
|     sput-object v0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->ENABLED_CHECKED_STATES:[[I
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     :array_0
 | |
|     .array-data 4
 | |
|         0x101009e
 | |
|         0x10100a0
 | |
|     .end array-data
 | |
| 
 | |
|     :array_1
 | |
|     .array-data 4
 | |
|         0x101009e
 | |
|         -0x10100a0
 | |
|     .end array-data
 | |
| 
 | |
|     :array_2
 | |
|     .array-data 4
 | |
|         -0x101009e
 | |
|         0x10100a0
 | |
|     .end array-data
 | |
| 
 | |
|     :array_3
 | |
|     .array-data 4
 | |
|         -0x101009e
 | |
|         -0x10100a0
 | |
|     .end array-data
 | |
| .end method
 | |
| 
 | |
| .method public constructor <init>(Landroid/content/Context;)V
 | |
|     .locals 1
 | |
|     .param p1    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0, p1, v0}, Lcom/google/android/material/radiobutton/MaterialRadioButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
 | |
|     .locals 1
 | |
|     .param p1    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # Landroid/util/AttributeSet;
 | |
|         .annotation build Landroidx/annotation/Nullable;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 2
 | |
|     sget v0, Lcom/google/android/material/R$attr;->radioButtonStyle:I
 | |
| 
 | |
|     invoke-direct {p0, p1, p2, v0}, Lcom/google/android/material/radiobutton/MaterialRadioButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
 | |
|     .locals 7
 | |
|     .param p1    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # Landroid/util/AttributeSet;
 | |
|         .annotation build Landroidx/annotation/Nullable;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 3
 | |
|     sget v4, Lcom/google/android/material/radiobutton/MaterialRadioButton;->DEF_STYLE_RES:I
 | |
| 
 | |
|     invoke-static {p1, p2, p3, v4}, Lcom/google/android/material/theme/overlay/MaterialThemeOverlay;->wrap(Landroid/content/Context;Landroid/util/AttributeSet;II)Landroid/content/Context;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     invoke-direct {p0, p1, p2, p3}, Landroidx/appcompat/widget/AppCompatRadioButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
 | |
| 
 | |
|     .line 4
 | |
|     invoke-virtual {p0}, Landroid/widget/RadioButton;->getContext()Landroid/content/Context;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     .line 5
 | |
|     sget-object v2, Lcom/google/android/material/R$styleable;->MaterialRadioButton:[I
 | |
| 
 | |
|     const/4 v6, 0x0
 | |
| 
 | |
|     new-array v5, v6, [I
 | |
| 
 | |
|     move-object v0, p1
 | |
| 
 | |
|     move-object v1, p2
 | |
| 
 | |
|     move v3, p3
 | |
| 
 | |
|     .line 6
 | |
|     invoke-static/range {v0 .. v5}, Lcom/google/android/material/internal/ThemeEnforcement;->obtainStyledAttributes(Landroid/content/Context;Landroid/util/AttributeSet;[III[I)Landroid/content/res/TypedArray;
 | |
| 
 | |
|     move-result-object p2
 | |
| 
 | |
|     .line 7
 | |
|     sget p3, Lcom/google/android/material/R$styleable;->MaterialRadioButton_buttonTint:I
 | |
| 
 | |
|     invoke-virtual {p2, p3}, Landroid/content/res/TypedArray;->hasValue(I)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 8
 | |
|     invoke-static {p1, p2, p3}, Lcom/google/android/material/resources/MaterialResources;->getColorStateList(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     .line 9
 | |
|     invoke-static {p0, p1}, Landroidx/core/widget/d;->d(Landroid/widget/CompoundButton;Landroid/content/res/ColorStateList;)V
 | |
| 
 | |
|     .line 10
 | |
|     :cond_0
 | |
|     sget p1, Lcom/google/android/material/R$styleable;->MaterialRadioButton_useMaterialThemeColors:I
 | |
| 
 | |
|     .line 11
 | |
|     invoke-virtual {p2, p1, v6}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     iput-boolean p1, p0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->useMaterialThemeColors:Z
 | |
| 
 | |
|     .line 12
 | |
|     invoke-virtual {p2}, Landroid/content/res/TypedArray;->recycle()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method private getMaterialThemeColorsTintList()Landroid/content/res/ColorStateList;
 | |
|     .locals 7
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->materialThemeColorsTintList:Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     sget v0, Lcom/google/android/material/R$attr;->colorControlActivated:I
 | |
| 
 | |
|     invoke-static {p0, v0}, Lcom/google/android/material/color/MaterialColors;->getColor(Landroid/view/View;I)I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     .line 3
 | |
|     sget v1, Lcom/google/android/material/R$attr;->colorOnSurface:I
 | |
| 
 | |
|     invoke-static {p0, v1}, Lcom/google/android/material/color/MaterialColors;->getColor(Landroid/view/View;I)I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     .line 4
 | |
|     sget v2, Lcom/google/android/material/R$attr;->colorSurface:I
 | |
| 
 | |
|     invoke-static {p0, v2}, Lcom/google/android/material/color/MaterialColors;->getColor(Landroid/view/View;I)I
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     .line 5
 | |
|     sget-object v3, Lcom/google/android/material/radiobutton/MaterialRadioButton;->ENABLED_CHECKED_STATES:[[I
 | |
| 
 | |
|     array-length v4, v3
 | |
| 
 | |
|     new-array v4, v4, [I
 | |
| 
 | |
|     const/4 v5, 0x0
 | |
| 
 | |
|     const/high16 v6, 0x3f800000    # 1.0f
 | |
| 
 | |
|     .line 6
 | |
|     invoke-static {v2, v0, v6}, Lcom/google/android/material/color/MaterialColors;->layer(IIF)I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     aput v0, v4, v5
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     const v5, 0x3f0a3d71    # 0.54f
 | |
| 
 | |
|     .line 7
 | |
|     invoke-static {v2, v1, v5}, Lcom/google/android/material/color/MaterialColors;->layer(IIF)I
 | |
| 
 | |
|     move-result v5
 | |
| 
 | |
|     aput v5, v4, v0
 | |
| 
 | |
|     const/4 v0, 0x2
 | |
| 
 | |
|     const v5, 0x3ec28f5c    # 0.38f
 | |
| 
 | |
|     .line 8
 | |
|     invoke-static {v2, v1, v5}, Lcom/google/android/material/color/MaterialColors;->layer(IIF)I
 | |
| 
 | |
|     move-result v6
 | |
| 
 | |
|     aput v6, v4, v0
 | |
| 
 | |
|     const/4 v0, 0x3
 | |
| 
 | |
|     .line 9
 | |
|     invoke-static {v2, v1, v5}, Lcom/google/android/material/color/MaterialColors;->layer(IIF)I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     aput v1, v4, v0
 | |
| 
 | |
|     .line 10
 | |
|     new-instance v0, Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     invoke-direct {v0, v3, v4}, Landroid/content/res/ColorStateList;-><init>([[I[I)V
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->materialThemeColorsTintList:Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     .line 11
 | |
|     :cond_0
 | |
|     iget-object v0, p0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->materialThemeColorsTintList:Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public isUseMaterialThemeColors()Z
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     iget-boolean v0, p0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->useMaterialThemeColors:Z
 | |
| 
 | |
|     return v0
 | |
| .end method
 | |
| 
 | |
| .method public onAttachedToWindow()V
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-super {p0}, Landroid/widget/RadioButton;->onAttachedToWindow()V
 | |
| 
 | |
|     .line 2
 | |
|     iget-boolean v0, p0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->useMaterialThemeColors:Z
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     invoke-static {p0}, Landroidx/core/widget/d;->b(Landroid/widget/CompoundButton;)Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p0, v0}, Lcom/google/android/material/radiobutton/MaterialRadioButton;->setUseMaterialThemeColors(Z)V
 | |
| 
 | |
|     :cond_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public setUseMaterialThemeColors(Z)V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     iput-boolean p1, p0, Lcom/google/android/material/radiobutton/MaterialRadioButton;->useMaterialThemeColors:Z
 | |
| 
 | |
|     if-eqz p1, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-direct {p0}, Lcom/google/android/material/radiobutton/MaterialRadioButton;->getMaterialThemeColorsTintList()Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     invoke-static {p0, p1}, Landroidx/core/widget/d;->d(Landroid/widget/CompoundButton;Landroid/content/res/ColorStateList;)V
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 p1, 0x0
 | |
| 
 | |
|     .line 3
 | |
|     invoke-static {p0, p1}, Landroidx/core/widget/d;->d(Landroid/widget/CompoundButton;Landroid/content/res/ColorStateList;)V
 | |
| 
 | |
|     :goto_0
 | |
|     return-void
 | |
| .end method
 |