460 lines
11 KiB
Smali
460 lines
11 KiB
Smali
.class public final Lbutterknife/ButterKnife;
|
|
.super Ljava/lang/Object;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lbutterknife/ButterKnife$Setter;,
|
|
Lbutterknife/ButterKnife$Action;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static bL:Z = false
|
|
|
|
.field static final bM:Ljava/util/Map;
|
|
.annotation build Landroidx/annotation/VisibleForTesting;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Class<",
|
|
"*>;",
|
|
"Ljava/lang/reflect/Constructor<",
|
|
"+",
|
|
"Lbutterknife/Unbinder;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
new-instance v0, Ljava/util/LinkedHashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/LinkedHashMap;-><init>()V
|
|
|
|
sput-object v0, Lbutterknife/ButterKnife;->bM:Ljava/util/Map;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>()V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance v0, Ljava/lang/AssertionError;
|
|
|
|
const-string v1, "No instances."
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/AssertionError;-><init>(Ljava/lang/Object;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static a(Landroid/app/Activity;)Lbutterknife/Unbinder;
|
|
.locals 1
|
|
.param p0 # Landroid/app/Activity;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Landroid/app/Activity;->getWindow()Landroid/view/Window;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/view/Window;->getDecorView()Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0, v0}, Lbutterknife/ButterKnife;->a(Ljava/lang/Object;Landroid/view/View;)Lbutterknife/Unbinder;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static a(Ljava/lang/Object;Landroid/view/View;)Lbutterknife/Unbinder;
|
|
.locals 4
|
|
.param p0 # Ljava/lang/Object;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v0
|
|
|
|
sget-boolean v1, Lbutterknife/ButterKnife;->bL:Z
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const-string v1, "ButterKnife"
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, "Looking up binding for "
|
|
|
|
invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_0
|
|
invoke-static {v0}, Lbutterknife/ButterKnife;->a(Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
sget-object p0, Lbutterknife/Unbinder;->bY:Lbutterknife/Unbinder;
|
|
|
|
return-object p0
|
|
|
|
:cond_1
|
|
const/4 v1, 0x2
|
|
|
|
:try_start_0
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object p0, v1, v2
|
|
|
|
const/4 p0, 0x1
|
|
|
|
aput-object p1, v1, p0
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/reflect/Constructor;->newInstance([Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Lbutterknife/Unbinder;
|
|
:try_end_0
|
|
.catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_2
|
|
.catch Ljava/lang/InstantiationException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/reflect/InvocationTargetException;->getCause()Ljava/lang/Throwable;
|
|
|
|
move-result-object p0
|
|
|
|
instance-of p1, p0, Ljava/lang/RuntimeException;
|
|
|
|
if-nez p1, :cond_3
|
|
|
|
instance-of p1, p0, Ljava/lang/Error;
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
check-cast p0, Ljava/lang/Error;
|
|
|
|
throw p0
|
|
|
|
:cond_2
|
|
new-instance p1, Ljava/lang/RuntimeException;
|
|
|
|
const-string v0, "Unable to create binding instance."
|
|
|
|
invoke-direct {p1, v0, p0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
throw p1
|
|
|
|
:cond_3
|
|
check-cast p0, Ljava/lang/RuntimeException;
|
|
|
|
throw p0
|
|
|
|
:catch_1
|
|
move-exception p0
|
|
|
|
new-instance p1, Ljava/lang/RuntimeException;
|
|
|
|
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Unable to invoke "
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0, p0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
throw p1
|
|
|
|
:catch_2
|
|
move-exception p0
|
|
|
|
new-instance p1, Ljava/lang/RuntimeException;
|
|
|
|
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Unable to invoke "
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0, p0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method private static a(Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
|
|
.locals 5
|
|
.annotation build Landroidx/annotation/CheckResult;
|
|
.end annotation
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/Class<",
|
|
"*>;)",
|
|
"Ljava/lang/reflect/Constructor<",
|
|
"+",
|
|
"Lbutterknife/Unbinder;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
sget-object v0, Lbutterknife/ButterKnife;->bM:Ljava/util/Map;
|
|
|
|
invoke-interface {v0, p0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/reflect/Constructor;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
sget-boolean p0, Lbutterknife/ButterKnife;->bL:Z
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
const-string p0, "ButterKnife"
|
|
|
|
const-string v1, "HIT: Cached in binding map."
|
|
|
|
invoke-static {p0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_0
|
|
return-object v0
|
|
|
|
:cond_1
|
|
invoke-virtual {p0}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "android."
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_5
|
|
|
|
const-string v1, "java."
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_5
|
|
|
|
const-string v1, "androidx."
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
:try_start_0
|
|
invoke-virtual {p0}, Ljava/lang/Class;->getClassLoader()Ljava/lang/ClassLoader;
|
|
|
|
move-result-object v1
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, "_ViewBinding"
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/ClassLoader;->loadClass(Ljava/lang/String;)Ljava/lang/Class;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
new-array v2, v2, [Ljava/lang/Class;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
aput-object p0, v2, v3
|
|
|
|
const/4 v3, 0x1
|
|
|
|
const-class v4, Landroid/view/View;
|
|
|
|
aput-object v4, v2, v3
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/Class;->getConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
|
|
|
|
move-result-object v1
|
|
|
|
sget-boolean v2, Lbutterknife/ButterKnife;->bL:Z
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
const-string v2, "ButterKnife"
|
|
|
|
const-string v3, "HIT: Loaded binding class and constructor."
|
|
|
|
invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
:try_end_0
|
|
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
new-instance v1, Ljava/lang/RuntimeException;
|
|
|
|
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v2, "Unable to find binding constructor for "
|
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v1, v0, p0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
throw v1
|
|
|
|
:catch_1
|
|
nop
|
|
|
|
sget-boolean v0, Lbutterknife/ButterKnife;->bL:Z
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
const-string v0, "ButterKnife"
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, "Not found. Trying superclass "
|
|
|
|
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Class;->getSuperclass()Ljava/lang/Class;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_3
|
|
invoke-virtual {p0}, Ljava/lang/Class;->getSuperclass()Ljava/lang/Class;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lbutterknife/ButterKnife;->a(Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
|
|
|
|
move-result-object v1
|
|
|
|
:cond_4
|
|
:goto_0
|
|
sget-object v0, Lbutterknife/ButterKnife;->bM:Ljava/util/Map;
|
|
|
|
invoke-interface {v0, p0, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
return-object v1
|
|
|
|
:cond_5
|
|
:goto_1
|
|
sget-boolean p0, Lbutterknife/ButterKnife;->bL:Z
|
|
|
|
if-eqz p0, :cond_6
|
|
|
|
const-string p0, "ButterKnife"
|
|
|
|
const-string v0, "MISS: Reached framework class. Abandoning search."
|
|
|
|
invoke-static {p0, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_6
|
|
const/4 p0, 0x0
|
|
|
|
return-object p0
|
|
.end method
|