274 lines
6.9 KiB
Smali
274 lines
6.9 KiB
Smali
.class public final Lcom/google/android/gms/common/internal/zaaa;
|
|
.super Landroid/widget/Button;
|
|
.source "com.google.android.gms:play-services-base@@18.0.1"
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 1
|
|
.param p2 # Landroid/util/AttributeSet;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
const/4 p2, 0x0
|
|
|
|
const v0, 0x1010048
|
|
|
|
.line 1
|
|
invoke-direct {p0, p1, p2, v0}, Landroid/widget/Button;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private static final zab(IIII)I
|
|
.locals 0
|
|
|
|
if-eqz p0, :cond_2
|
|
|
|
const/4 p1, 0x1
|
|
|
|
if-eq p0, p1, :cond_1
|
|
|
|
const/4 p1, 0x2
|
|
|
|
if-ne p0, p1, :cond_0
|
|
|
|
return p3
|
|
|
|
.line 1
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const/16 p2, 0x21
|
|
|
|
const-string p3, "Unknown color scheme: "
|
|
|
|
invoke-static {p2, p3, p0}, Lcom/google/android/gms/ads/a;->a(ILjava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
return p2
|
|
|
|
:cond_2
|
|
return p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final zaa(Landroid/content/res/Resources;II)V
|
|
.locals 6
|
|
|
|
.line 1
|
|
sget-object v0, Landroid/graphics/Typeface;->DEFAULT_BOLD:Landroid/graphics/Typeface;
|
|
|
|
invoke-virtual {p0, v0}, Landroid/widget/Button;->setTypeface(Landroid/graphics/Typeface;)V
|
|
|
|
const/high16 v0, 0x41600000 # 14.0f
|
|
|
|
.line 2
|
|
invoke-virtual {p0, v0}, Landroid/widget/Button;->setTextSize(F)V
|
|
|
|
.line 3
|
|
invoke-virtual {p1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
|
|
|
|
move-result-object v0
|
|
|
|
iget v0, v0, Landroid/util/DisplayMetrics;->density:F
|
|
|
|
const/high16 v1, 0x42400000 # 48.0f
|
|
|
|
mul-float/2addr v0, v1
|
|
|
|
const/high16 v1, 0x3f000000 # 0.5f
|
|
|
|
add-float/2addr v0, v1
|
|
|
|
float-to-int v0, v0
|
|
|
|
.line 4
|
|
invoke-virtual {p0, v0}, Landroid/widget/Button;->setMinHeight(I)V
|
|
|
|
.line 5
|
|
invoke-virtual {p0, v0}, Landroid/widget/Button;->setMinWidth(I)V
|
|
|
|
.line 6
|
|
sget v0, Lcom/google/android/gms/base/R$drawable;->common_google_signin_btn_icon_dark:I
|
|
|
|
sget v1, Lcom/google/android/gms/base/R$drawable;->common_google_signin_btn_icon_light:I
|
|
|
|
.line 7
|
|
invoke-static {p3, v0, v1, v1}, Lcom/google/android/gms/common/internal/zaaa;->zab(IIII)I
|
|
|
|
move-result v0
|
|
|
|
sget v1, Lcom/google/android/gms/base/R$drawable;->common_google_signin_btn_text_dark:I
|
|
|
|
sget v2, Lcom/google/android/gms/base/R$drawable;->common_google_signin_btn_text_light:I
|
|
|
|
.line 8
|
|
invoke-static {p3, v1, v2, v2}, Lcom/google/android/gms/common/internal/zaaa;->zab(IIII)I
|
|
|
|
move-result v1
|
|
|
|
const-string v2, "Unknown button size: "
|
|
|
|
const/16 v3, 0x20
|
|
|
|
const/4 v4, 0x2
|
|
|
|
const/4 v5, 0x1
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
if-eq p2, v5, :cond_1
|
|
|
|
if-ne p2, v4, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 9
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-static {v3, v2, p2}, Lcom/google/android/gms/ads/a;->a(ILjava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
.line 10
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
move v0, v1
|
|
|
|
.line 11
|
|
:goto_0
|
|
invoke-virtual {p1, v0}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Ld1/c;->r(Landroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v0
|
|
|
|
.line 12
|
|
sget v1, Lcom/google/android/gms/base/R$color;->common_google_signin_btn_tint:I
|
|
|
|
.line 13
|
|
invoke-virtual {p1, v1}, Landroid/content/res/Resources;->getColorStateList(I)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object v1
|
|
|
|
.line 14
|
|
invoke-static {v0, v1}, Ld1/c;->o(Landroid/graphics/drawable/Drawable;Landroid/content/res/ColorStateList;)V
|
|
|
|
sget-object v1, Landroid/graphics/PorterDuff$Mode;->SRC_ATOP:Landroid/graphics/PorterDuff$Mode;
|
|
|
|
.line 15
|
|
invoke-static {v0, v1}, Ld1/c;->p(Landroid/graphics/drawable/Drawable;Landroid/graphics/PorterDuff$Mode;)V
|
|
|
|
.line 16
|
|
invoke-virtual {p0, v0}, Landroid/widget/Button;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
.line 17
|
|
sget v0, Lcom/google/android/gms/base/R$color;->common_google_signin_btn_text_dark:I
|
|
|
|
sget v1, Lcom/google/android/gms/base/R$color;->common_google_signin_btn_text_light:I
|
|
|
|
.line 18
|
|
invoke-static {p3, v0, v1, v1}, Lcom/google/android/gms/common/internal/zaaa;->zab(IIII)I
|
|
|
|
move-result p3
|
|
|
|
.line 19
|
|
invoke-virtual {p1, p3}, Landroid/content/res/Resources;->getColorStateList(I)Landroid/content/res/ColorStateList;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-static {p3}, Lcom/google/android/gms/common/internal/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p3
|
|
|
|
check-cast p3, Landroid/content/res/ColorStateList;
|
|
|
|
invoke-virtual {p0, p3}, Landroid/widget/Button;->setTextColor(Landroid/content/res/ColorStateList;)V
|
|
|
|
const/4 p3, 0x0
|
|
|
|
if-eqz p2, :cond_4
|
|
|
|
if-eq p2, v5, :cond_3
|
|
|
|
if-ne p2, v4, :cond_2
|
|
|
|
.line 20
|
|
invoke-virtual {p0, p3}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 21
|
|
:cond_2
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-static {v3, v2, p2}, Lcom/google/android/gms/ads/a;->a(ILjava/lang/String;I)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
.line 22
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 23
|
|
:cond_3
|
|
sget p2, Lcom/google/android/gms/base/R$string;->common_signin_button_text_long:I
|
|
|
|
invoke-virtual {p1, p2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 24
|
|
:cond_4
|
|
sget p2, Lcom/google/android/gms/base/R$string;->common_signin_button_text:I
|
|
|
|
invoke-virtual {p1, p2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
.line 25
|
|
:goto_1
|
|
invoke-virtual {p0, p3}, Landroid/widget/Button;->setTransformationMethod(Landroid/text/method/TransformationMethod;)V
|
|
|
|
.line 26
|
|
invoke-virtual {p0}, Landroid/widget/Button;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lcom/google/android/gms/common/util/DeviceProperties;->isWearable(Landroid/content/Context;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
const/16 p1, 0x13
|
|
|
|
.line 27
|
|
invoke-virtual {p0, p1}, Landroid/widget/Button;->setGravity(I)V
|
|
|
|
:cond_5
|
|
return-void
|
|
.end method
|