834 lines
		
	
	
		
			26 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			834 lines
		
	
	
		
			26 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class public Lcom/google/android/material/resources/TextAppearance;
 | |
| .super Ljava/lang/Object;
 | |
| .source "TextAppearance.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 TAG:Ljava/lang/String; = "TextAppearance"
 | |
| 
 | |
| .field private static final TYPEFACE_MONOSPACE:I = 0x3
 | |
| 
 | |
| .field private static final TYPEFACE_SANS:I = 0x1
 | |
| 
 | |
| .field private static final TYPEFACE_SERIF:I = 0x2
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field private font:Landroid/graphics/Typeface;
 | |
| 
 | |
| .field public final fontFamily:Ljava/lang/String;
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field private final fontFamilyResourceId:I
 | |
|     .annotation build Landroidx/annotation/FontRes;
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field private fontResolved:Z
 | |
| 
 | |
| .field public final hasLetterSpacing:Z
 | |
| 
 | |
| .field public final letterSpacing:F
 | |
| 
 | |
| .field public final shadowColor:Landroid/content/res/ColorStateList;
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public final shadowDx:F
 | |
| 
 | |
| .field public final shadowDy:F
 | |
| 
 | |
| .field public final shadowRadius:F
 | |
| 
 | |
| .field public final textAllCaps:Z
 | |
| 
 | |
| .field public final textColor:Landroid/content/res/ColorStateList;
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public final textColorHint:Landroid/content/res/ColorStateList;
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public final textColorLink:Landroid/content/res/ColorStateList;
 | |
|     .annotation build Landroidx/annotation/Nullable;
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field public textSize:F
 | |
| 
 | |
| .field public final textStyle:I
 | |
| 
 | |
| .field public final typeface:I
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>(Landroid/content/Context;I)V
 | |
|     .locals 5
 | |
|     .param p1    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # I
 | |
|         .annotation build Landroidx/annotation/StyleRes;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Ljava/lang/Object;-><init>()V
 | |
| 
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 2
 | |
|     iput-boolean v0, p0, Lcom/google/android/material/resources/TextAppearance;->fontResolved:Z
 | |
| 
 | |
|     .line 3
 | |
|     sget-object v1, Lcom/google/android/material/R$styleable;->TextAppearance:[I
 | |
| 
 | |
|     invoke-virtual {p1, p2, v1}, Landroid/content/Context;->obtainStyledAttributes(I[I)Landroid/content/res/TypedArray;
 | |
| 
 | |
|     move-result-object v1
 | |
| 
 | |
|     .line 4
 | |
|     sget v2, Lcom/google/android/material/R$styleable;->TextAppearance_android_textSize:I
 | |
| 
 | |
|     const/4 v3, 0x0
 | |
| 
 | |
|     invoke-virtual {v1, v2, v3}, Landroid/content/res/TypedArray;->getDimension(IF)F
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     iput v2, p0, Lcom/google/android/material/resources/TextAppearance;->textSize:F
 | |
| 
 | |
|     .line 5
 | |
|     sget v2, Lcom/google/android/material/R$styleable;->TextAppearance_android_textColor:I
 | |
| 
 | |
|     .line 6
 | |
|     invoke-static {p1, v1, v2}, Lcom/google/android/material/resources/MaterialResources;->getColorStateList(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     iput-object v2, p0, Lcom/google/android/material/resources/TextAppearance;->textColor:Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     .line 7
 | |
|     sget v2, Lcom/google/android/material/R$styleable;->TextAppearance_android_textColorHint:I
 | |
| 
 | |
|     .line 8
 | |
|     invoke-static {p1, v1, v2}, Lcom/google/android/material/resources/MaterialResources;->getColorStateList(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     iput-object v2, p0, Lcom/google/android/material/resources/TextAppearance;->textColorHint:Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     .line 9
 | |
|     sget v2, Lcom/google/android/material/R$styleable;->TextAppearance_android_textColorLink:I
 | |
| 
 | |
|     .line 10
 | |
|     invoke-static {p1, v1, v2}, Lcom/google/android/material/resources/MaterialResources;->getColorStateList(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     iput-object v2, p0, Lcom/google/android/material/resources/TextAppearance;->textColorLink:Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     .line 11
 | |
|     sget v2, Lcom/google/android/material/R$styleable;->TextAppearance_android_textStyle:I
 | |
| 
 | |
|     invoke-virtual {v1, v2, v0}, Landroid/content/res/TypedArray;->getInt(II)I
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     iput v2, p0, Lcom/google/android/material/resources/TextAppearance;->textStyle:I
 | |
| 
 | |
|     .line 12
 | |
|     sget v2, Lcom/google/android/material/R$styleable;->TextAppearance_android_typeface:I
 | |
| 
 | |
|     const/4 v4, 0x1
 | |
| 
 | |
|     invoke-virtual {v1, v2, v4}, Landroid/content/res/TypedArray;->getInt(II)I
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     iput v2, p0, Lcom/google/android/material/resources/TextAppearance;->typeface:I
 | |
| 
 | |
|     .line 13
 | |
|     sget v2, Lcom/google/android/material/R$styleable;->TextAppearance_fontFamily:I
 | |
| 
 | |
|     sget v4, Lcom/google/android/material/R$styleable;->TextAppearance_android_fontFamily:I
 | |
| 
 | |
|     .line 14
 | |
|     invoke-static {v1, v2, v4}, Lcom/google/android/material/resources/MaterialResources;->getIndexWithValue(Landroid/content/res/TypedArray;II)I
 | |
| 
 | |
|     move-result v2
 | |
| 
 | |
|     .line 15
 | |
|     invoke-virtual {v1, v2, v0}, Landroid/content/res/TypedArray;->getResourceId(II)I
 | |
| 
 | |
|     move-result v4
 | |
| 
 | |
|     iput v4, p0, Lcom/google/android/material/resources/TextAppearance;->fontFamilyResourceId:I
 | |
| 
 | |
|     .line 16
 | |
|     invoke-virtual {v1, v2}, Landroid/content/res/TypedArray;->getString(I)Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v2
 | |
| 
 | |
|     iput-object v2, p0, Lcom/google/android/material/resources/TextAppearance;->fontFamily:Ljava/lang/String;
 | |
| 
 | |
|     .line 17
 | |
|     sget v2, Lcom/google/android/material/R$styleable;->TextAppearance_textAllCaps:I
 | |
| 
 | |
|     invoke-virtual {v1, v2, v0}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     iput-boolean v0, p0, Lcom/google/android/material/resources/TextAppearance;->textAllCaps:Z
 | |
| 
 | |
|     .line 18
 | |
|     sget v0, Lcom/google/android/material/R$styleable;->TextAppearance_android_shadowColor:I
 | |
| 
 | |
|     .line 19
 | |
|     invoke-static {p1, v1, v0}, Lcom/google/android/material/resources/MaterialResources;->getColorStateList(Landroid/content/Context;Landroid/content/res/TypedArray;I)Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/android/material/resources/TextAppearance;->shadowColor:Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     .line 20
 | |
|     sget v0, Lcom/google/android/material/R$styleable;->TextAppearance_android_shadowDx:I
 | |
| 
 | |
|     invoke-virtual {v1, v0, v3}, Landroid/content/res/TypedArray;->getFloat(IF)F
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     iput v0, p0, Lcom/google/android/material/resources/TextAppearance;->shadowDx:F
 | |
| 
 | |
|     .line 21
 | |
|     sget v0, Lcom/google/android/material/R$styleable;->TextAppearance_android_shadowDy:I
 | |
| 
 | |
|     invoke-virtual {v1, v0, v3}, Landroid/content/res/TypedArray;->getFloat(IF)F
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     iput v0, p0, Lcom/google/android/material/resources/TextAppearance;->shadowDy:F
 | |
| 
 | |
|     .line 22
 | |
|     sget v0, Lcom/google/android/material/R$styleable;->TextAppearance_android_shadowRadius:I
 | |
| 
 | |
|     invoke-virtual {v1, v0, v3}, Landroid/content/res/TypedArray;->getFloat(IF)F
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     iput v0, p0, Lcom/google/android/material/resources/TextAppearance;->shadowRadius:F
 | |
| 
 | |
|     .line 23
 | |
|     invoke-virtual {v1}, Landroid/content/res/TypedArray;->recycle()V
 | |
| 
 | |
|     .line 24
 | |
|     sget-object v0, Lcom/google/android/material/R$styleable;->MaterialTextAppearance:[I
 | |
| 
 | |
|     invoke-virtual {p1, p2, v0}, Landroid/content/Context;->obtainStyledAttributes(I[I)Landroid/content/res/TypedArray;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     .line 25
 | |
|     sget p2, Lcom/google/android/material/R$styleable;->MaterialTextAppearance_android_letterSpacing:I
 | |
| 
 | |
|     invoke-virtual {p1, p2}, Landroid/content/res/TypedArray;->hasValue(I)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     iput-boolean v0, p0, Lcom/google/android/material/resources/TextAppearance;->hasLetterSpacing:Z
 | |
| 
 | |
|     .line 26
 | |
|     invoke-virtual {p1, p2, v3}, Landroid/content/res/TypedArray;->getFloat(IF)F
 | |
| 
 | |
|     move-result p2
 | |
| 
 | |
|     iput p2, p0, Lcom/google/android/material/resources/TextAppearance;->letterSpacing:F
 | |
| 
 | |
|     .line 27
 | |
|     invoke-virtual {p1}, Landroid/content/res/TypedArray;->recycle()V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public static synthetic access$000(Lcom/google/android/material/resources/TextAppearance;)Landroid/graphics/Typeface;
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     iget-object p0, p0, Lcom/google/android/material/resources/TextAppearance;->font:Landroid/graphics/Typeface;
 | |
| 
 | |
|     return-object p0
 | |
| .end method
 | |
| 
 | |
| .method public static synthetic access$002(Lcom/google/android/material/resources/TextAppearance;Landroid/graphics/Typeface;)Landroid/graphics/Typeface;
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     iput-object p1, p0, Lcom/google/android/material/resources/TextAppearance;->font:Landroid/graphics/Typeface;
 | |
| 
 | |
|     return-object p1
 | |
| .end method
 | |
| 
 | |
| .method public static synthetic access$102(Lcom/google/android/material/resources/TextAppearance;Z)Z
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     iput-boolean p1, p0, Lcom/google/android/material/resources/TextAppearance;->fontResolved:Z
 | |
| 
 | |
|     return p1
 | |
| .end method
 | |
| 
 | |
| .method private createFallbackFont()V
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lcom/google/android/material/resources/TextAppearance;->font:Landroid/graphics/Typeface;
 | |
| 
 | |
|     if-nez v0, :cond_0
 | |
| 
 | |
|     iget-object v0, p0, Lcom/google/android/material/resources/TextAppearance;->fontFamily:Ljava/lang/String;
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     iget v1, p0, Lcom/google/android/material/resources/TextAppearance;->textStyle:I
 | |
| 
 | |
|     invoke-static {v0, v1}, Landroid/graphics/Typeface;->create(Ljava/lang/String;I)Landroid/graphics/Typeface;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/android/material/resources/TextAppearance;->font:Landroid/graphics/Typeface;
 | |
| 
 | |
|     .line 3
 | |
|     :cond_0
 | |
|     iget-object v0, p0, Lcom/google/android/material/resources/TextAppearance;->font:Landroid/graphics/Typeface;
 | |
| 
 | |
|     if-nez v0, :cond_4
 | |
| 
 | |
|     .line 4
 | |
|     iget v0, p0, Lcom/google/android/material/resources/TextAppearance;->typeface:I
 | |
| 
 | |
|     const/4 v1, 0x1
 | |
| 
 | |
|     if-eq v0, v1, :cond_3
 | |
| 
 | |
|     const/4 v1, 0x2
 | |
| 
 | |
|     if-eq v0, v1, :cond_2
 | |
| 
 | |
|     const/4 v1, 0x3
 | |
| 
 | |
|     if-eq v0, v1, :cond_1
 | |
| 
 | |
|     .line 5
 | |
|     sget-object v0, Landroid/graphics/Typeface;->DEFAULT:Landroid/graphics/Typeface;
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/android/material/resources/TextAppearance;->font:Landroid/graphics/Typeface;
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 6
 | |
|     :cond_1
 | |
|     sget-object v0, Landroid/graphics/Typeface;->MONOSPACE:Landroid/graphics/Typeface;
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/android/material/resources/TextAppearance;->font:Landroid/graphics/Typeface;
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 7
 | |
|     :cond_2
 | |
|     sget-object v0, Landroid/graphics/Typeface;->SERIF:Landroid/graphics/Typeface;
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/android/material/resources/TextAppearance;->font:Landroid/graphics/Typeface;
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 8
 | |
|     :cond_3
 | |
|     sget-object v0, Landroid/graphics/Typeface;->SANS_SERIF:Landroid/graphics/Typeface;
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/android/material/resources/TextAppearance;->font:Landroid/graphics/Typeface;
 | |
| 
 | |
|     .line 9
 | |
|     :goto_0
 | |
|     iget-object v0, p0, Lcom/google/android/material/resources/TextAppearance;->font:Landroid/graphics/Typeface;
 | |
| 
 | |
|     iget v1, p0, Lcom/google/android/material/resources/TextAppearance;->textStyle:I
 | |
| 
 | |
|     invoke-static {v0, v1}, Landroid/graphics/Typeface;->create(Landroid/graphics/Typeface;I)Landroid/graphics/Typeface;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     iput-object v0, p0, Lcom/google/android/material/resources/TextAppearance;->font:Landroid/graphics/Typeface;
 | |
| 
 | |
|     :cond_4
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method private shouldLoadFontSynchronously(Landroid/content/Context;)Z
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-static {}, Lcom/google/android/material/resources/TextAppearanceConfig;->shouldLoadFontSynchronously()Z
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     return p1
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public getFallbackFont()Landroid/graphics/Typeface;
 | |
|     .locals 1
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Lcom/google/android/material/resources/TextAppearance;->createFallbackFont()V
 | |
| 
 | |
|     .line 2
 | |
|     iget-object v0, p0, Lcom/google/android/material/resources/TextAppearance;->font:Landroid/graphics/Typeface;
 | |
| 
 | |
|     return-object v0
 | |
| .end method
 | |
| 
 | |
| .method public getFont(Landroid/content/Context;)Landroid/graphics/Typeface;
 | |
|     .locals 2
 | |
|     .param p1    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .annotation build Landroidx/annotation/NonNull;
 | |
|     .end annotation
 | |
| 
 | |
|     .annotation build Landroidx/annotation/VisibleForTesting;
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     iget-boolean v0, p0, Lcom/google/android/material/resources/TextAppearance;->fontResolved:Z
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     iget-object p1, p0, Lcom/google/android/material/resources/TextAppearance;->font:Landroid/graphics/Typeface;
 | |
| 
 | |
|     return-object p1
 | |
| 
 | |
|     .line 3
 | |
|     :cond_0
 | |
|     invoke-virtual {p1}, Landroid/content/Context;->isRestricted()Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-nez v0, :cond_1
 | |
| 
 | |
|     .line 4
 | |
|     :try_start_0
 | |
|     iget v0, p0, Lcom/google/android/material/resources/TextAppearance;->fontFamilyResourceId:I
 | |
| 
 | |
|     invoke-static {p1, v0}, Landroidx/core/content/res/a;->i(Landroid/content/Context;I)Landroid/graphics/Typeface;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     iput-object p1, p0, Lcom/google/android/material/resources/TextAppearance;->font:Landroid/graphics/Typeface;
 | |
| 
 | |
|     if-eqz p1, :cond_1
 | |
| 
 | |
|     .line 5
 | |
|     iget v0, p0, Lcom/google/android/material/resources/TextAppearance;->textStyle:I
 | |
| 
 | |
|     invoke-static {p1, v0}, Landroid/graphics/Typeface;->create(Landroid/graphics/Typeface;I)Landroid/graphics/Typeface;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     iput-object p1, p0, Lcom/google/android/material/resources/TextAppearance;->font:Landroid/graphics/Typeface;
 | |
|     :try_end_0
 | |
|     .catch Ljava/lang/UnsupportedOperationException; {:try_start_0 .. :try_end_0} :catch_1
 | |
|     .catch Landroid/content/res/Resources$NotFoundException; {:try_start_0 .. :try_end_0} :catch_1
 | |
|     .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :catch_0
 | |
|     move-exception p1
 | |
| 
 | |
|     const-string v0, "Error loading font "
 | |
| 
 | |
|     .line 6
 | |
|     invoke-static {v0}, Landroid/support/v4/media/d;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     iget-object v1, p0, Lcom/google/android/material/resources/TextAppearance;->fontFamily:Ljava/lang/String;
 | |
| 
 | |
|     invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     const-string v1, "TextAppearance"
 | |
| 
 | |
|     invoke-static {v1, v0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
 | |
| 
 | |
|     .line 7
 | |
|     :catch_1
 | |
|     :cond_1
 | |
|     :goto_0
 | |
|     invoke-direct {p0}, Lcom/google/android/material/resources/TextAppearance;->createFallbackFont()V
 | |
| 
 | |
|     const/4 p1, 0x1
 | |
| 
 | |
|     .line 8
 | |
|     iput-boolean p1, p0, Lcom/google/android/material/resources/TextAppearance;->fontResolved:Z
 | |
| 
 | |
|     .line 9
 | |
|     iget-object p1, p0, Lcom/google/android/material/resources/TextAppearance;->font:Landroid/graphics/Typeface;
 | |
| 
 | |
|     return-object p1
 | |
| .end method
 | |
| 
 | |
| .method public getFontAsync(Landroid/content/Context;Landroid/text/TextPaint;Lcom/google/android/material/resources/TextAppearanceFontCallback;)V
 | |
|     .locals 1
 | |
|     .param p1    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # Landroid/text/TextPaint;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p3    # Lcom/google/android/material/resources/TextAppearanceFontCallback;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 14
 | |
|     invoke-virtual {p0}, Lcom/google/android/material/resources/TextAppearance;->getFallbackFont()Landroid/graphics/Typeface;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     invoke-virtual {p0, p2, v0}, Lcom/google/android/material/resources/TextAppearance;->updateTextPaintMeasureState(Landroid/text/TextPaint;Landroid/graphics/Typeface;)V
 | |
| 
 | |
|     .line 15
 | |
|     new-instance v0, Lcom/google/android/material/resources/TextAppearance$2;
 | |
| 
 | |
|     invoke-direct {v0, p0, p2, p3}, Lcom/google/android/material/resources/TextAppearance$2;-><init>(Lcom/google/android/material/resources/TextAppearance;Landroid/text/TextPaint;Lcom/google/android/material/resources/TextAppearanceFontCallback;)V
 | |
| 
 | |
|     invoke-virtual {p0, p1, v0}, Lcom/google/android/material/resources/TextAppearance;->getFontAsync(Landroid/content/Context;Lcom/google/android/material/resources/TextAppearanceFontCallback;)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public getFontAsync(Landroid/content/Context;Lcom/google/android/material/resources/TextAppearanceFontCallback;)V
 | |
|     .locals 4
 | |
|     .param p1    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # Lcom/google/android/material/resources/TextAppearanceFontCallback;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0, p1}, Lcom/google/android/material/resources/TextAppearance;->shouldLoadFontSynchronously(Landroid/content/Context;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0, p1}, Lcom/google/android/material/resources/TextAppearance;->getFont(Landroid/content/Context;)Landroid/graphics/Typeface;
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 3
 | |
|     :cond_0
 | |
|     invoke-direct {p0}, Lcom/google/android/material/resources/TextAppearance;->createFallbackFont()V
 | |
| 
 | |
|     .line 4
 | |
|     :goto_0
 | |
|     iget v0, p0, Lcom/google/android/material/resources/TextAppearance;->fontFamilyResourceId:I
 | |
| 
 | |
|     const/4 v1, 0x1
 | |
| 
 | |
|     if-nez v0, :cond_1
 | |
| 
 | |
|     .line 5
 | |
|     iput-boolean v1, p0, Lcom/google/android/material/resources/TextAppearance;->fontResolved:Z
 | |
| 
 | |
|     .line 6
 | |
|     :cond_1
 | |
|     iget-boolean v2, p0, Lcom/google/android/material/resources/TextAppearance;->fontResolved:Z
 | |
| 
 | |
|     if-eqz v2, :cond_2
 | |
| 
 | |
|     .line 7
 | |
|     iget-object p1, p0, Lcom/google/android/material/resources/TextAppearance;->font:Landroid/graphics/Typeface;
 | |
| 
 | |
|     invoke-virtual {p2, p1, v1}, Lcom/google/android/material/resources/TextAppearanceFontCallback;->onFontRetrieved(Landroid/graphics/Typeface;Z)V
 | |
| 
 | |
|     return-void
 | |
| 
 | |
|     .line 8
 | |
|     :cond_2
 | |
|     :try_start_0
 | |
|     new-instance v2, Lcom/google/android/material/resources/TextAppearance$1;
 | |
| 
 | |
|     invoke-direct {v2, p0, p2}, Lcom/google/android/material/resources/TextAppearance$1;-><init>(Lcom/google/android/material/resources/TextAppearance;Lcom/google/android/material/resources/TextAppearanceFontCallback;)V
 | |
| 
 | |
|     const/4 v3, 0x0
 | |
| 
 | |
|     invoke-static {p1, v0, v2, v3}, Landroidx/core/content/res/a;->k(Landroid/content/Context;ILandroidx/core/content/res/a$d;Landroid/os/Handler;)V
 | |
|     :try_end_0
 | |
|     .catch Landroid/content/res/Resources$NotFoundException; {:try_start_0 .. :try_end_0} :catch_1
 | |
|     .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :catch_0
 | |
|     move-exception p1
 | |
| 
 | |
|     const-string v0, "Error loading font "
 | |
| 
 | |
|     .line 9
 | |
|     invoke-static {v0}, Landroid/support/v4/media/d;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     iget-object v2, p0, Lcom/google/android/material/resources/TextAppearance;->fontFamily:Ljava/lang/String;
 | |
| 
 | |
|     invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
 | |
| 
 | |
|     invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     const-string v2, "TextAppearance"
 | |
| 
 | |
|     invoke-static {v2, v0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
 | |
| 
 | |
|     .line 10
 | |
|     iput-boolean v1, p0, Lcom/google/android/material/resources/TextAppearance;->fontResolved:Z
 | |
| 
 | |
|     const/4 p1, -0x3
 | |
| 
 | |
|     .line 11
 | |
|     invoke-virtual {p2, p1}, Lcom/google/android/material/resources/TextAppearanceFontCallback;->onFontRetrievalFailed(I)V
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     .line 12
 | |
|     :catch_1
 | |
|     iput-boolean v1, p0, Lcom/google/android/material/resources/TextAppearance;->fontResolved:Z
 | |
| 
 | |
|     .line 13
 | |
|     invoke-virtual {p2, v1}, Lcom/google/android/material/resources/TextAppearanceFontCallback;->onFontRetrievalFailed(I)V
 | |
| 
 | |
|     :goto_1
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public updateDrawState(Landroid/content/Context;Landroid/text/TextPaint;Lcom/google/android/material/resources/TextAppearanceFontCallback;)V
 | |
|     .locals 4
 | |
|     .param p1    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # Landroid/text/TextPaint;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p3    # Lcom/google/android/material/resources/TextAppearanceFontCallback;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p0, p1, p2, p3}, Lcom/google/android/material/resources/TextAppearance;->updateMeasureState(Landroid/content/Context;Landroid/text/TextPaint;Lcom/google/android/material/resources/TextAppearanceFontCallback;)V
 | |
| 
 | |
|     .line 2
 | |
|     iget-object p1, p0, Lcom/google/android/material/resources/TextAppearance;->textColor:Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     if-eqz p1, :cond_0
 | |
| 
 | |
|     iget-object p3, p2, Landroid/text/TextPaint;->drawableState:[I
 | |
| 
 | |
|     .line 3
 | |
|     invoke-virtual {p1}, Landroid/content/res/ColorStateList;->getDefaultColor()I
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     invoke-virtual {p1, p3, v0}, Landroid/content/res/ColorStateList;->getColorForState([II)I
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     const/high16 p1, -0x1000000
 | |
| 
 | |
|     .line 4
 | |
|     :goto_0
 | |
|     invoke-virtual {p2, p1}, Landroid/text/TextPaint;->setColor(I)V
 | |
| 
 | |
|     .line 5
 | |
|     iget p1, p0, Lcom/google/android/material/resources/TextAppearance;->shadowRadius:F
 | |
| 
 | |
|     iget p3, p0, Lcom/google/android/material/resources/TextAppearance;->shadowDx:F
 | |
| 
 | |
|     iget v0, p0, Lcom/google/android/material/resources/TextAppearance;->shadowDy:F
 | |
| 
 | |
|     iget-object v1, p0, Lcom/google/android/material/resources/TextAppearance;->shadowColor:Landroid/content/res/ColorStateList;
 | |
| 
 | |
|     if-eqz v1, :cond_1
 | |
| 
 | |
|     iget-object v2, p2, Landroid/text/TextPaint;->drawableState:[I
 | |
| 
 | |
|     .line 6
 | |
|     invoke-virtual {v1}, Landroid/content/res/ColorStateList;->getDefaultColor()I
 | |
| 
 | |
|     move-result v3
 | |
| 
 | |
|     invoke-virtual {v1, v2, v3}, Landroid/content/res/ColorStateList;->getColorForState([II)I
 | |
| 
 | |
|     move-result v1
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_1
 | |
|     const/4 v1, 0x0
 | |
| 
 | |
|     .line 7
 | |
|     :goto_1
 | |
|     invoke-virtual {p2, p1, p3, v0, v1}, Landroid/text/TextPaint;->setShadowLayer(FFFI)V
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public updateMeasureState(Landroid/content/Context;Landroid/text/TextPaint;Lcom/google/android/material/resources/TextAppearanceFontCallback;)V
 | |
|     .locals 1
 | |
|     .param p1    # Landroid/content/Context;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # Landroid/text/TextPaint;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p3    # Lcom/google/android/material/resources/TextAppearanceFontCallback;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0, p1}, Lcom/google/android/material/resources/TextAppearance;->shouldLoadFontSynchronously(Landroid/content/Context;)Z
 | |
| 
 | |
|     move-result v0
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     .line 2
 | |
|     invoke-virtual {p0, p1}, Lcom/google/android/material/resources/TextAppearance;->getFont(Landroid/content/Context;)Landroid/graphics/Typeface;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     invoke-virtual {p0, p2, p1}, Lcom/google/android/material/resources/TextAppearance;->updateTextPaintMeasureState(Landroid/text/TextPaint;Landroid/graphics/Typeface;)V
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     .line 3
 | |
|     :cond_0
 | |
|     invoke-virtual {p0, p1, p2, p3}, Lcom/google/android/material/resources/TextAppearance;->getFontAsync(Landroid/content/Context;Landroid/text/TextPaint;Lcom/google/android/material/resources/TextAppearanceFontCallback;)V
 | |
| 
 | |
|     :goto_0
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method public updateTextPaintMeasureState(Landroid/text/TextPaint;Landroid/graphics/Typeface;)V
 | |
|     .locals 1
 | |
|     .param p1    # Landroid/text/TextPaint;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
|     .param p2    # Landroid/graphics/Typeface;
 | |
|         .annotation build Landroidx/annotation/NonNull;
 | |
|         .end annotation
 | |
|     .end param
 | |
| 
 | |
|     .line 1
 | |
|     invoke-virtual {p1, p2}, Landroid/text/TextPaint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;
 | |
| 
 | |
|     .line 2
 | |
|     iget v0, p0, Lcom/google/android/material/resources/TextAppearance;->textStyle:I
 | |
| 
 | |
|     invoke-virtual {p2}, Landroid/graphics/Typeface;->getStyle()I
 | |
| 
 | |
|     move-result p2
 | |
| 
 | |
|     not-int p2, p2
 | |
| 
 | |
|     and-int/2addr p2, v0
 | |
| 
 | |
|     and-int/lit8 v0, p2, 0x1
 | |
| 
 | |
|     if-eqz v0, :cond_0
 | |
| 
 | |
|     const/4 v0, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 v0, 0x0
 | |
| 
 | |
|     .line 3
 | |
|     :goto_0
 | |
|     invoke-virtual {p1, v0}, Landroid/text/TextPaint;->setFakeBoldText(Z)V
 | |
| 
 | |
|     and-int/lit8 p2, p2, 0x2
 | |
| 
 | |
|     if-eqz p2, :cond_1
 | |
| 
 | |
|     const/high16 p2, -0x41800000    # -0.25f
 | |
| 
 | |
|     goto :goto_1
 | |
| 
 | |
|     :cond_1
 | |
|     const/4 p2, 0x0
 | |
| 
 | |
|     .line 4
 | |
|     :goto_1
 | |
|     invoke-virtual {p1, p2}, Landroid/text/TextPaint;->setTextSkewX(F)V
 | |
| 
 | |
|     .line 5
 | |
|     iget p2, p0, Lcom/google/android/material/resources/TextAppearance;->textSize:F
 | |
| 
 | |
|     invoke-virtual {p1, p2}, Landroid/text/TextPaint;->setTextSize(F)V
 | |
| 
 | |
|     .line 6
 | |
|     iget-boolean p2, p0, Lcom/google/android/material/resources/TextAppearance;->hasLetterSpacing:Z
 | |
| 
 | |
|     if-eqz p2, :cond_2
 | |
| 
 | |
|     .line 7
 | |
|     iget p2, p0, Lcom/google/android/material/resources/TextAppearance;->letterSpacing:F
 | |
| 
 | |
|     invoke-virtual {p1, p2}, Landroid/text/TextPaint;->setLetterSpacing(F)V
 | |
| 
 | |
|     :cond_2
 | |
|     return-void
 | |
| .end method
 |