今奥全景相机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1012 lines
21 KiB

.class public Lcom/afollestad/materialdialogs/a/a;
.super Ljava/lang/Object;
.source "DialogUtils.java"
# direct methods
.method public static a(IF)I
.locals 4
.param p0 # I
.annotation build Landroid/support/annotation/ColorInt;
.end annotation
.end param
.annotation build Landroid/support/annotation/ColorInt;
.end annotation
.prologue
.line 48
invoke-static {p0}, Landroid/graphics/Color;->alpha(I)I
move-result v0
int-to-float v0, v0
mul-float/2addr v0, p1
invoke-static {v0}, Ljava/lang/Math;->round(F)I
move-result v0
.line 49
invoke-static {p0}, Landroid/graphics/Color;->red(I)I
move-result v1
.line 50
invoke-static {p0}, Landroid/graphics/Color;->green(I)I
move-result v2
.line 51
invoke-static {p0}, Landroid/graphics/Color;->blue(I)I
move-result v3
.line 52
invoke-static {v0, v1, v2, v3}, Landroid/graphics/Color;->argb(IIII)I
move-result v0
return v0
.end method
.method public static a(Landroid/content/Context;)I
.locals 2
.annotation build Landroid/support/annotation/ColorInt;
.end annotation
.prologue
.line 40
const v0, 0x1010036
invoke-static {p0, v0}, Lcom/afollestad/materialdialogs/a/a;->a(Landroid/content/Context;I)I
move-result v0
.line 41
invoke-static {v0}, Lcom/afollestad/materialdialogs/a/a;->a(I)Z
move-result v0
if-eqz v0, :cond_0
const/high16 v0, -0x1000000
.line 42
:goto_0
const v1, 0x3e99999a # 0.3f
invoke-static {v0, v1}, Lcom/afollestad/materialdialogs/a/a;->a(IF)I
move-result v0
return v0
.line 41
:cond_0
const/4 v0, -0x1
goto :goto_0
.end method
.method public static a(Landroid/content/Context;I)I
.locals 1
.param p1 # I
.annotation build Landroid/support/annotation/AttrRes;
.end annotation
.end param
.annotation build Landroid/support/annotation/ColorInt;
.end annotation
.prologue
.line 57
const/4 v0, 0x0
invoke-static {p0, p1, v0}, Lcom/afollestad/materialdialogs/a/a;->a(Landroid/content/Context;II)I
move-result v0
return v0
.end method
.method public static a(Landroid/content/Context;II)I
.locals 3
.param p1 # I
.annotation build Landroid/support/annotation/AttrRes;
.end annotation
.end param
.annotation build Landroid/support/annotation/ColorInt;
.end annotation
.prologue
const/4 v2, 0x0
.line 62
invoke-virtual {p0}, Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme;
move-result-object v0
const/4 v1, 0x1
new-array v1, v1, [I
aput p1, v1, v2
invoke-virtual {v0, v1}, Landroid/content/res/Resources$Theme;->obtainStyledAttributes([I)Landroid/content/res/TypedArray;
move-result-object v0
.line 64
const/4 v1, 0x0
:try_start_0
invoke-virtual {v0, v1, p2}, Landroid/content/res/TypedArray;->getColor(II)I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
move-result v1
.line 66
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
.line 64
return v1
.line 66
:catchall_0
move-exception v1
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
throw v1
.end method
.method private static a(Lcom/afollestad/materialdialogs/e;)I
.locals 2
.prologue
.line 136
sget-object v0, Lcom/afollestad/materialdialogs/a/a$2;->a:[I
invoke-virtual {p0}, Lcom/afollestad/materialdialogs/e;->ordinal()I
move-result v1
aget v0, v0, v1
packed-switch v0, :pswitch_data_0
.line 142
const/4 v0, 0x0
:goto_0
return v0
.line 138
:pswitch_0
const/4 v0, 0x1
goto :goto_0
.line 140
:pswitch_1
const/4 v0, 0x2
goto :goto_0
.line 136
nop
:pswitch_data_0
.packed-switch 0x1
:pswitch_0
:pswitch_1
.end packed-switch
.end method
.method public static a(Landroid/content/Context;ILandroid/content/res/ColorStateList;)Landroid/content/res/ColorStateList;
.locals 4
.param p1 # I
.annotation build Landroid/support/annotation/AttrRes;
.end annotation
.end param
.prologue
const/4 v2, 0x0
.line 73
invoke-virtual {p0}, Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme;
move-result-object v0
const/4 v1, 0x1
new-array v1, v1, [I
aput p1, v1, v2
invoke-virtual {v0, v1}, Landroid/content/res/Resources$Theme;->obtainStyledAttributes([I)Landroid/content/res/TypedArray;
move-result-object v1
.line 75
const/4 v0, 0x0
:try_start_0
invoke-virtual {v1, v0}, Landroid/content/res/TypedArray;->peekValue(I)Landroid/util/TypedValue;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
move-result-object v0
.line 76
if-nez v0, :cond_0
.line 91
invoke-virtual {v1}, Landroid/content/res/TypedArray;->recycle()V
.line 87
:goto_0
return-object p2
.line 79
:cond_0
:try_start_1
iget v2, v0, Landroid/util/TypedValue;->type:I
const/16 v3, 0x1c
if-lt v2, v3, :cond_1
iget v2, v0, Landroid/util/TypedValue;->type:I
const/16 v3, 0x1f
if-gt v2, v3, :cond_1
.line 81
iget v0, v0, Landroid/util/TypedValue;->data:I
invoke-static {p0, v0}, Lcom/afollestad/materialdialogs/a/a;->g(Landroid/content/Context;I)Landroid/content/res/ColorStateList;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
move-result-object p2
.line 91
invoke-virtual {v1}, Landroid/content/res/TypedArray;->recycle()V
goto :goto_0
.line 83
:cond_1
const/4 v0, 0x0
:try_start_2
invoke-virtual {v1, v0}, Landroid/content/res/TypedArray;->getColorStateList(I)Landroid/content/res/ColorStateList;
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
move-result-object v0
.line 84
if-eqz v0, :cond_2
.line 91
invoke-virtual {v1}, Landroid/content/res/TypedArray;->recycle()V
move-object p2, v0
.line 85
goto :goto_0
.line 91
:cond_2
invoke-virtual {v1}, Landroid/content/res/TypedArray;->recycle()V
goto :goto_0
:catchall_0
move-exception v0
invoke-virtual {v1}, Landroid/content/res/TypedArray;->recycle()V
throw v0
.end method
.method private static a(Landroid/content/Context;ILandroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
.locals 3
.param p1 # I
.annotation build Landroid/support/annotation/AttrRes;
.end annotation
.end param
.prologue
const/4 v2, 0x0
.line 171
invoke-virtual {p0}, Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme;
move-result-object v0
const/4 v1, 0x1
new-array v1, v1, [I
aput p1, v1, v2
invoke-virtual {v0, v1}, Landroid/content/res/Resources$Theme;->obtainStyledAttributes([I)Landroid/content/res/TypedArray;
move-result-object v1
.line 173
const/4 v0, 0x0
:try_start_0
invoke-virtual {v1, v0}, Landroid/content/res/TypedArray;->getDrawable(I)Landroid/graphics/drawable/Drawable;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
move-result-object v0
.line 174
if-nez v0, :cond_0
if-eqz p2, :cond_0
.line 179
:goto_0
invoke-virtual {v1}, Landroid/content/res/TypedArray;->recycle()V
.line 177
return-object p2
.line 179
:catchall_0
move-exception v0
invoke-virtual {v1}, Landroid/content/res/TypedArray;->recycle()V
throw v0
:cond_0
move-object p2, v0
goto :goto_0
.end method
.method public static a(Landroid/content/Context;ILcom/afollestad/materialdialogs/e;)Lcom/afollestad/materialdialogs/e;
.locals 3
.param p1 # I
.annotation build Landroid/support/annotation/AttrRes;
.end annotation
.end param
.prologue
const/4 v2, 0x0
.line 148
invoke-virtual {p0}, Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme;
move-result-object v0
const/4 v1, 0x1
new-array v1, v1, [I
aput p1, v1, v2
invoke-virtual {v0, v1}, Landroid/content/res/Resources$Theme;->obtainStyledAttributes([I)Landroid/content/res/TypedArray;
move-result-object v1
.line 150
const/4 v0, 0x0
:try_start_0
invoke-static {p2}, Lcom/afollestad/materialdialogs/a/a;->a(Lcom/afollestad/materialdialogs/e;)I
move-result v2
invoke-virtual {v1, v0, v2}, Landroid/content/res/TypedArray;->getInt(II)I
move-result v0
packed-switch v0, :pswitch_data_0
.line 156
sget-object v0, Lcom/afollestad/materialdialogs/e;->a:Lcom/afollestad/materialdialogs/e;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 159
invoke-virtual {v1}, Landroid/content/res/TypedArray;->recycle()V
.line 156
:goto_0
return-object v0
.line 152
:pswitch_0
:try_start_1
sget-object v0, Lcom/afollestad/materialdialogs/e;->b:Lcom/afollestad/materialdialogs/e;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 159
invoke-virtual {v1}, Landroid/content/res/TypedArray;->recycle()V
goto :goto_0
.line 154
:pswitch_1
:try_start_2
sget-object v0, Lcom/afollestad/materialdialogs/e;->c:Lcom/afollestad/materialdialogs/e;
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 159
invoke-virtual {v1}, Landroid/content/res/TypedArray;->recycle()V
goto :goto_0
:catchall_0
move-exception v0
invoke-virtual {v1}, Landroid/content/res/TypedArray;->recycle()V
throw v0
.line 150
nop
:pswitch_data_0
.packed-switch 0x1
:pswitch_0
:pswitch_1
.end packed-switch
.end method
.method public static a(Landroid/content/DialogInterface;Lcom/afollestad/materialdialogs/f$a;)V
.locals 2
.param p0 # Landroid/content/DialogInterface;
.annotation build Landroid/support/annotation/NonNull;
.end annotation
.end param
.param p1 # Lcom/afollestad/materialdialogs/f$a;
.annotation build Landroid/support/annotation/NonNull;
.end annotation
.end param
.prologue
.line 228
check-cast p0, Lcom/afollestad/materialdialogs/f;
.line 229
invoke-virtual {p0}, Lcom/afollestad/materialdialogs/f;->g()Landroid/widget/EditText;
move-result-object v0
if-nez v0, :cond_0
.line 247
:goto_0
return-void
.line 233
:cond_0
invoke-virtual {p0}, Lcom/afollestad/materialdialogs/f;->g()Landroid/widget/EditText;
move-result-object v0
new-instance v1, Lcom/afollestad/materialdialogs/a/a$1;
invoke-direct {v1, p0, p1}, Lcom/afollestad/materialdialogs/a/a$1;-><init>(Lcom/afollestad/materialdialogs/f;Lcom/afollestad/materialdialogs/f$a;)V
.line 234
invoke-virtual {v0, v1}, Landroid/widget/EditText;->post(Ljava/lang/Runnable;)Z
goto :goto_0
.end method
.method public static a(Landroid/view/View;Landroid/graphics/drawable/Drawable;)V
.locals 2
.prologue
.line 218
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v1, 0x10
if-ge v0, v1, :cond_0
.line 220
invoke-virtual {p0, p1}, Landroid/view/View;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V
.line 224
:goto_0
return-void
.line 222
:cond_0
invoke-virtual {p0, p1}, Landroid/view/View;->setBackground(Landroid/graphics/drawable/Drawable;)V
goto :goto_0
.end method
.method public static a(I)Z
.locals 8
.param p0 # I
.annotation build Landroid/support/annotation/ColorInt;
.end annotation
.end param
.prologue
.line 210
const-wide/high16 v0, 0x3ff0000000000000L # 1.0
const-wide v2, 0x3fd322d0e5604189L # 0.299
.line 212
invoke-static {p0}, Landroid/graphics/Color;->red(I)I
move-result v4
int-to-double v4, v4
mul-double/2addr v2, v4
const-wide v4, 0x3fe2c8b439581062L # 0.587
invoke-static {p0}, Landroid/graphics/Color;->green(I)I
move-result v6
int-to-double v6, v6
mul-double/2addr v4, v6
add-double/2addr v2, v4
const-wide v4, 0x3fbd2f1a9fbe76c9L # 0.114
invoke-static {p0}, Landroid/graphics/Color;->blue(I)I
move-result v6
int-to-double v6, v6
mul-double/2addr v4, v6
add-double/2addr v2, v4
const-wide v4, 0x406fe00000000000L # 255.0
div-double/2addr v2, v4
sub-double/2addr v0, v2
.line 214
const-wide/high16 v2, 0x3fe0000000000000L # 0.5
cmpl-double v0, v0, v2
if-ltz v0, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method public static a(Landroid/content/Context;IZ)Z
.locals 3
.param p1 # I
.annotation build Landroid/support/annotation/AttrRes;
.end annotation
.end param
.prologue
const/4 v2, 0x0
.line 197
invoke-virtual {p0}, Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme;
move-result-object v0
const/4 v1, 0x1
new-array v1, v1, [I
aput p1, v1, v2
invoke-virtual {v0, v1}, Landroid/content/res/Resources$Theme;->obtainStyledAttributes([I)Landroid/content/res/TypedArray;
move-result-object v0
.line 199
const/4 v1, 0x0
:try_start_0
invoke-virtual {v0, v1, p2}, Landroid/content/res/TypedArray;->getBoolean(IZ)Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
move-result v1
.line 201
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
.line 199
return v1
.line 201
:catchall_0
move-exception v1
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
throw v1
.end method
.method public static a(Ljava/lang/Object;[Ljava/lang/Object;)Z
.locals 4
.param p0 # Ljava/lang/Object;
.annotation build Landroid/support/annotation/NonNull;
.end annotation
.end param
.param p1 # [Ljava/lang/Object;
.annotation build Landroid/support/annotation/Nullable;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(TT;[TT;)Z"
}
.end annotation
.prologue
const/4 v0, 0x0
.line 296
if-eqz p1, :cond_0
array-length v1, p1
if-nez v1, :cond_1
.line 304
:cond_0
:goto_0
return v0
.line 299
:cond_1
array-length v2, p1
move v1, v0
:goto_1
if-ge v1, v2, :cond_0
aget-object v3, p1, v1
.line 300
invoke-virtual {v3, p0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_2
.line 301
const/4 v0, 0x1
goto :goto_0
.line 299
:cond_2
add-int/lit8 v1, v1, 0x1
goto :goto_1
.end method
.method public static b(Landroid/content/Context;I)I
.locals 1
.param p1 # I
.annotation build Landroid/support/annotation/ColorRes;
.end annotation
.end param
.annotation build Landroid/support/annotation/ColorInt;
.end annotation
.prologue
.line 126
invoke-static {p0, p1}, Landroid/support/v4/content/ContextCompat;->getColor(Landroid/content/Context;I)I
move-result v0
return v0
.end method
.method private static b(Landroid/content/Context;II)I
.locals 3
.param p1 # I
.annotation build Landroid/support/annotation/AttrRes;
.end annotation
.end param
.prologue
const/4 v2, 0x0
.line 188
invoke-virtual {p0}, Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme;
move-result-object v0
const/4 v1, 0x1
new-array v1, v1, [I
aput p1, v1, v2
invoke-virtual {v0, v1}, Landroid/content/res/Resources$Theme;->obtainStyledAttributes([I)Landroid/content/res/TypedArray;
move-result-object v0
.line 190
const/4 v1, 0x0
:try_start_0
invoke-virtual {v0, v1, p2}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
move-result v1
.line 192
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
.line 190
return v1
.line 192
:catchall_0
move-exception v1
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
throw v1
.end method
.method public static b(Landroid/content/DialogInterface;Lcom/afollestad/materialdialogs/f$a;)V
.locals 3
.param p0 # Landroid/content/DialogInterface;
.annotation build Landroid/support/annotation/NonNull;
.end annotation
.end param
.param p1 # Lcom/afollestad/materialdialogs/f$a;
.annotation build Landroid/support/annotation/NonNull;
.end annotation
.end param
.prologue
.line 251
check-cast p0, Lcom/afollestad/materialdialogs/f;
.line 252
invoke-virtual {p0}, Lcom/afollestad/materialdialogs/f;->g()Landroid/widget/EditText;
move-result-object v0
if-nez v0, :cond_1
.line 265
:cond_0
:goto_0
return-void
.line 256
:cond_1
invoke-virtual {p1}, Lcom/afollestad/materialdialogs/f$a;->a()Landroid/content/Context;
move-result-object v0
const-string v1, "input_method"
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/view/inputmethod/InputMethodManager;
.line 257
if-eqz v0, :cond_0
.line 258
invoke-virtual {p0}, Lcom/afollestad/materialdialogs/f;->getCurrentFocus()Landroid/view/View;
move-result-object v1
.line 259
if-eqz v1, :cond_2
.line 260
invoke-virtual {v1}, Landroid/view/View;->getWindowToken()Landroid/os/IBinder;
move-result-object v1
.line 261
:goto_1
if-eqz v1, :cond_0
.line 262
const/4 v2, 0x0
invoke-virtual {v0, v1, v2}, Landroid/view/inputmethod/InputMethodManager;->hideSoftInputFromWindow(Landroid/os/IBinder;I)Z
goto :goto_0
.line 260
:cond_2
invoke-virtual {p0}, Lcom/afollestad/materialdialogs/f;->f()Landroid/view/View;
move-result-object v1
invoke-virtual {v1}, Landroid/view/View;->getWindowToken()Landroid/os/IBinder;
move-result-object v1
goto :goto_1
.end method
.method public static c(Landroid/content/Context;I)Ljava/lang/String;
.locals 3
.param p1 # I
.annotation build Landroid/support/annotation/AttrRes;
.end annotation
.end param
.prologue
.line 130
new-instance v0, Landroid/util/TypedValue;
invoke-direct {v0}, Landroid/util/TypedValue;-><init>()V
.line 131
invoke-virtual {p0}, Landroid/content/Context;->getTheme()Landroid/content/res/Resources$Theme;
move-result-object v1
const/4 v2, 0x1
invoke-virtual {v1, p1, v0, v2}, Landroid/content/res/Resources$Theme;->resolveAttribute(ILandroid/util/TypedValue;Z)Z
.line 132
iget-object v0, v0, Landroid/util/TypedValue;->string:Ljava/lang/CharSequence;
check-cast v0, Ljava/lang/String;
return-object v0
.end method
.method public static d(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
.locals 1
.param p1 # I
.annotation build Landroid/support/annotation/AttrRes;
.end annotation
.end param
.prologue
.line 164
const/4 v0, 0x0
invoke-static {p0, p1, v0}, Lcom/afollestad/materialdialogs/a/a;->a(Landroid/content/Context;ILandroid/graphics/drawable/Drawable;)Landroid/graphics/drawable/Drawable;
move-result-object v0
return-object v0
.end method
.method public static e(Landroid/content/Context;I)I
.locals 1
.param p1 # I
.annotation build Landroid/support/annotation/AttrRes;
.end annotation
.end param
.prologue
.line 184
const/4 v0, -0x1
invoke-static {p0, p1, v0}, Lcom/afollestad/materialdialogs/a/a;->b(Landroid/content/Context;II)I
move-result v0
return v0
.end method
.method public static f(Landroid/content/Context;I)Z
.locals 1
.param p1 # I
.annotation build Landroid/support/annotation/AttrRes;
.end annotation
.end param
.prologue
.line 206
const/4 v0, 0x0
invoke-static {p0, p1, v0}, Lcom/afollestad/materialdialogs/a/a;->a(Landroid/content/Context;IZ)Z
move-result v0
return v0
.end method
.method public static g(Landroid/content/Context;I)Landroid/content/res/ColorStateList;
.locals 6
.prologue
const/4 v5, 0x2
const/4 v4, 0x1
const/4 v3, 0x0
.line 268
const v0, 0x1010036
.line 269
invoke-static {p0, v0}, Lcom/afollestad/materialdialogs/a/a;->a(Landroid/content/Context;I)I
move-result v0
.line 270
if-nez p1, :cond_0
move p1, v0
.line 273
:cond_0
new-array v0, v5, [[I
new-array v1, v4, [I
const v2, -0x101009e
aput v2, v1, v3
aput-object v1, v0, v3
new-array v1, v3, [I
aput-object v1, v0, v4
.line 278
new-array v1, v5, [I
const v2, 0x3ecccccd # 0.4f
invoke-static {p1, v2}, Lcom/afollestad/materialdialogs/a/a;->a(IF)I
move-result v2
aput v2, v1, v3
aput p1, v1, v4
.line 279
new-instance v2, Landroid/content/res/ColorStateList;
invoke-direct {v2, v0, v1}, Landroid/content/res/ColorStateList;-><init>([[I[I)V
return-object v2
.end method