403 lines
		
	
	
		
			9.6 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			403 lines
		
	
	
		
			9.6 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class public Lcom/google/android/material/resources/MaterialResources;
 | |
| .super Ljava/lang/Object;
 | |
| .source "MaterialResources.java"
 | |
| 
 | |
| 
 | |
| # annotations
 | |
| .annotation build Landroidx/annotation/RestrictTo;
 | |
|     value = {
 | |
|         .enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope;
 | |
|     }
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # static fields
 | |
| .field private static final FONT_SCALE_1_3:F = 1.3f
 | |
| 
 | |
| .field private static final FONT_SCALE_2_0:F = 2.0f
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method private constructor <init>()V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Ljava/lang/Object;-><init>()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public static getColorStateList(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;
 | |
|     .locals 1
 | |
|     .param p0    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p1    # Landroid/content/res/TypedArray;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # I
 | |
|         .annotation build Landroidx/annotation/StyleableRes;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p1, p2}, Landroid/content/res/TypedArray;->hasValue(I)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p1, p2, v0}, Landroid/content/res/TypedArray;->getResourceId(II)I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     invoke-static {p0, v0}, Lg/a;->c(Landroid/content/Context;I)Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     if-eqz p0, :cond_0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 4
 | |
|     :cond_0
 | |
|     invoke-virtual {p1, p2}, Landroid/content/res/TypedArray;->getColorStateList(I)Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static getColorStateList(Landroid/content/Context;Landroidx/appcompat/widget/j0;I)Landroid/content/res/ColorStateList;
 | |
|     .locals 1
 | |
|     .param p0    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p1    # Landroidx/appcompat/widget/j0;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # I
 | |
|         .annotation build Landroidx/annotation/StyleableRes;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p1, p2}, Landroidx/appcompat/widget/j0;->C(I)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 6
 | |
|     invoke-virtual {p1, p2, v0}, Landroidx/appcompat/widget/j0;->u(II)I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 7
 | |
|     invoke-static {p0, v0}, Lg/a;->c(Landroid/content/Context;I)Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     if-eqz p0, :cond_0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 8
 | |
|     :cond_0
 | |
|     invoke-virtual {p1, p2}, Landroidx/appcompat/widget/j0;->d(I)Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static getDimensionPixelSize(Landroid/content/Context;Landroid/content/res/TypedArray;II)I
 | |
|     .locals 3
 | |
|     .param p0    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p1    # Landroid/content/res/TypedArray;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # I
 | |
|         .annotation build Landroidx/annotation/StyleableRes;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     new-instance v0, Landroid/util/TypedValue;
 | |
| 
 | |
|     invoke-direct {v0}, Landroid/util/TypedValue;-><init>()V
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p1, p2, v0}, Landroid/content/res/TypedArray;->getValue(ILandroid/util/TypedValue;)Z
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     if-eqz v1, :cond_1
 | |
| 
 | |
|     iget v1, v0, Landroid/util/TypedValue;->type:I
 | |
| 
 | |
|     const/4 v2, 0x2
 | |
| 
 | |
|     if-eq v1, v2, :cond_0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 3
 | |
|     :cond_0
 | |
|     invoke-virtual {p0}, Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     const/4 p1, 0x1
 | |
| 
 | |
|     new-array p1, p1, [I
 | |
| 
 | |
|     iget p2, v0, Landroid/util/TypedValue;->data:I
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     aput p2, p1, v0
 | |
| 
 | |
|     invoke-virtual {p0, p1}, Landroid/content/res/Resources$Theme;->obtainStyledAttributes([I)Landroid/content/res/TypedArray;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     .line 4
 | |
|     invoke-virtual {p0, v0, p3}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     .line 5
 | |
|     invoke-virtual {p0}, Landroid/content/res/TypedArray;->recycle()V
 | |
| 
 | |
|     return p1
 | |
| 
 | |
|     .line 6
 | |
|     :cond_1
 | |
|     :goto_0
 | |
|     invoke-virtual {p1, p2, p3}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I
 | |
| 
 | |
|     move-result p0
 | |
| 
 | |
|     return p0
 | |
| .end method
 | |
| 
 | |
| .method public static getDrawable(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/graphics/drawable/Drawable;
 | |
|     .locals 1
 | |
|     .param p0    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p1    # Landroid/content/res/TypedArray;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # I
 | |
|         .annotation build Landroidx/annotation/StyleableRes;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p1, p2}, Landroid/content/res/TypedArray;->hasValue(I)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p1, p2, v0}, Landroid/content/res/TypedArray;->getResourceId(II)I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     invoke-static {p0, v0}, Lg/a;->d(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     if-eqz p0, :cond_0
 | |
| 
 | |
|     return-object p0
 | |
| 
 | |
|     .line 4
 | |
|     :cond_0
 | |
|     invoke-virtual {p1, p2}, Landroid/content/res/TypedArray;->getDrawable(I)Landroid/graphics/drawable/Drawable;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static getIndexWithValue(Landroid/content/res/TypedArray;II)I
 | |
|     .locals 0
 | |
|     .param p0    # Landroid/content/res/TypedArray;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p1    # I
 | |
|         .annotation build Landroidx/annotation/StyleableRes;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # I
 | |
|         .annotation build Landroidx/annotation/StyleableRes;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroidx/annotation/StyleableRes;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0, p1}, Landroid/content/res/TypedArray;->hasValue(I)Z
 | |
| 
 | |
|     move-result p0
 | |
| 
 | |
|     if-eqz p0, :cond_0
 | |
| 
 | |
|     return p1
 | |
| 
 | |
|     :cond_0
 | |
|     return p2
 | |
| .end method
 | |
| 
 | |
| .method public static getTextAppearance(Landroid/content/Context;Landroid/content/res/TypedArray;I)Lcom/google/android/material/resources/TextAppearance;
 | |
|     .locals 1
 | |
|     .param p0    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p1    # Landroid/content/res/TypedArray;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # I
 | |
|         .annotation build Landroidx/annotation/StyleableRes;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p1, p2}, Landroid/content/res/TypedArray;->hasValue(I)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p1, p2, v0}, Landroid/content/res/TypedArray;->getResourceId(II)I
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     if-eqz p1, :cond_0
 | |
| 
 | |
|     .line 3
 | |
|     new-instance p2, Lcom/google/android/material/resources/TextAppearance;
 | |
| 
 | |
|     invoke-direct {p2, p0, p1}, Lcom/google/android/material/resources/TextAppearance;-><init>(Landroid/content/Context;I)V
 | |
| 
 | |
|     return-object p2
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 p0, 0x0
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static isFontScaleAtLeast1_3(Landroid/content/Context;)Z
 | |
|     .locals 1
 | |
|     .param p0    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-virtual {p0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     iget p0, p0, Landroid/content/res/Configuration;->fontScale:F
 | |
| 
 | |
|     const v0, 0x3fa66666    # 1.3f
 | |
| 
 | |
|     cmpl-float p0, p0, v0
 | |
| 
 | |
|     if-ltz p0, :cond_0
 | |
| 
 | |
|     const/4 p0, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 p0, 0x0
 | |
| 
 | |
|     :goto_0
 | |
|     return p0
 | |
| .end method
 | |
| 
 | |
| .method public static isFontScaleAtLeast2_0(Landroid/content/Context;)Z
 | |
|     .locals 1
 | |
|     .param p0    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     invoke-virtual {p0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
 | |
| 
 | |
|     move-result-object p0
 | |
| 
 | |
|     iget p0, p0, Landroid/content/res/Configuration;->fontScale:F
 | |
| 
 | |
|     const/high16 v0, 0x40000000    # 2.0f
 | |
| 
 | |
|     cmpl-float p0, p0, v0
 | |
| 
 | |
|     if-ltz p0, :cond_0
 | |
| 
 | |
|     const/4 p0, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 p0, 0x0
 | |
| 
 | |
|     :goto_0
 | |
|     return p0
 | |
| .end method
 |