Rabbit-R1/original r1/smali/smali_classes2/androidx/multidex/MultiDex.smali
2024-05-21 17:08:36 -04:00

1628 lines
42 KiB
Smali

.class public final Landroidx/multidex/MultiDex;
.super Ljava/lang/Object;
.source "MultiDex.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/multidex/MultiDex$V4;,
Landroidx/multidex/MultiDex$V14;,
Landroidx/multidex/MultiDex$V19;
}
.end annotation
# static fields
.field private static final CODE_CACHE_NAME:Ljava/lang/String; = "code_cache"
.field private static final CODE_CACHE_SECONDARY_FOLDER_NAME:Ljava/lang/String; = "secondary-dexes"
.field private static final IS_VM_MULTIDEX_CAPABLE:Z
.field private static final MAX_SUPPORTED_SDK_VERSION:I = 0x14
.field private static final MIN_SDK_VERSION:I = 0x4
.field private static final NO_KEY_PREFIX:Ljava/lang/String; = ""
.field private static final OLD_SECONDARY_FOLDER_NAME:Ljava/lang/String; = "secondary-dexes"
.field static final TAG:Ljava/lang/String; = "MultiDex"
.field private static final VM_WITH_MULTIDEX_VERSION_MAJOR:I = 0x2
.field private static final VM_WITH_MULTIDEX_VERSION_MINOR:I = 0x1
.field private static final installedApk:Ljava/util/Set;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/Set<",
"Ljava/io/File;",
">;"
}
.end annotation
.end field
# direct methods
.method static constructor <clinit>()V
.locals 1
.line 76
new-instance v0, Ljava/util/HashSet;
invoke-direct {v0}, Ljava/util/HashSet;-><init>()V
sput-object v0, Landroidx/multidex/MultiDex;->installedApk:Ljava/util/Set;
const-string v0, "java.vm.version"
.line 79
invoke-static {v0}, Ljava/lang/System;->getProperty(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Landroidx/multidex/MultiDex;->isVMMultidexCapable(Ljava/lang/String;)Z
move-result v0
sput-boolean v0, Landroidx/multidex/MultiDex;->IS_VM_MULTIDEX_CAPABLE:Z
return-void
.end method
.method private constructor <init>()V
.locals 0
.line 81
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method static synthetic access$000(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/reflect/Field;
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/NoSuchFieldException;
}
.end annotation
.line 56
invoke-static {p0, p1}, Landroidx/multidex/MultiDex;->findField(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/reflect/Field;
move-result-object p0
return-object p0
.end method
.method static synthetic access$100(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/NoSuchFieldException;,
Ljava/lang/IllegalArgumentException;,
Ljava/lang/IllegalAccessException;
}
.end annotation
.line 56
invoke-static {p0, p1, p2}, Landroidx/multidex/MultiDex;->expandFieldArray(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
return-void
.end method
.method static synthetic access$200(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
.locals 0
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/NoSuchMethodException;
}
.end annotation
.line 56
invoke-static {p0, p1, p2}, Landroidx/multidex/MultiDex;->findMethod(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object p0
return-object p0
.end method
.method private static clearOldDexDir(Landroid/content/Context;)V
.locals 8
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Exception;
}
.end annotation
.line 451
new-instance v0, Ljava/io/File;
invoke-virtual {p0}, Landroid/content/Context;->getFilesDir()Ljava/io/File;
move-result-object p0
const-string v1, "secondary-dexes"
invoke-direct {v0, p0, v1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 452
invoke-virtual {v0}, Ljava/io/File;->isDirectory()Z
move-result p0
if-eqz p0, :cond_4
.line 453
new-instance p0, Ljava/lang/StringBuilder;
const-string v1, "Clearing old secondary dex dir ("
invoke-direct {p0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/File;->getPath()Ljava/lang/String;
move-result-object v1
invoke-virtual {p0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
const-string v1, ")."
invoke-virtual {p0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
const-string v2, "MultiDex"
invoke-static {v2, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 454
invoke-virtual {v0}, Ljava/io/File;->listFiles()[Ljava/io/File;
move-result-object p0
if-nez p0, :cond_0
.line 456
new-instance p0, Ljava/lang/StringBuilder;
const-string v3, "Failed to list secondary dex dir content ("
invoke-direct {p0, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/File;->getPath()Ljava/lang/String;
move-result-object v0
invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-static {v2, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
return-void
.line 459
:cond_0
array-length v1, p0
const/4 v3, 0x0
:goto_0
if-ge v3, v1, :cond_2
aget-object v4, p0, v3
.line 460
new-instance v5, Ljava/lang/StringBuilder;
const-string v6, "Trying to delete old file "
invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v4}, Ljava/io/File;->getPath()Ljava/lang/String;
move-result-object v6
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
const-string v6, " of size "
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
.line 461
invoke-virtual {v4}, Ljava/io/File;->length()J
move-result-wide v6
invoke-virtual {v5, v6, v7}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
.line 460
invoke-static {v2, v5}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 462
invoke-virtual {v4}, Ljava/io/File;->delete()Z
move-result v5
if-nez v5, :cond_1
.line 463
new-instance v5, Ljava/lang/StringBuilder;
const-string v6, "Failed to delete old file "
invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v4}, Ljava/io/File;->getPath()Ljava/lang/String;
move-result-object v4
invoke-virtual {v5, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v2, v4}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_1
.line 465
:cond_1
new-instance v5, Ljava/lang/StringBuilder;
const-string v6, "Deleted old file "
invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v4}, Ljava/io/File;->getPath()Ljava/lang/String;
move-result-object v4
invoke-virtual {v5, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v2, v4}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
:goto_1
add-int/lit8 v3, v3, 0x1
goto :goto_0
.line 468
:cond_2
invoke-virtual {v0}, Ljava/io/File;->delete()Z
move-result p0
if-nez p0, :cond_3
.line 469
new-instance p0, Ljava/lang/StringBuilder;
const-string v1, "Failed to delete secondary dex dir "
invoke-direct {p0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/File;->getPath()Ljava/lang/String;
move-result-object v0
invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-static {v2, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_2
.line 471
:cond_3
new-instance p0, Ljava/lang/StringBuilder;
const-string v1, "Deleted old secondary dex dir "
invoke-direct {p0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v0}, Ljava/io/File;->getPath()Ljava/lang/String;
move-result-object v0
invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-static {v2, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
:cond_4
:goto_2
return-void
.end method
.method private static doInstallation(Landroid/content/Context;Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Z)V
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;,
Ljava/lang/IllegalArgumentException;,
Ljava/lang/IllegalAccessException;,
Ljava/lang/NoSuchFieldException;,
Ljava/lang/reflect/InvocationTargetException;,
Ljava/lang/NoSuchMethodException;,
Ljava/lang/SecurityException;,
Ljava/lang/ClassNotFoundException;,
Ljava/lang/InstantiationException;
}
.end annotation
const-string v0, ": SDK version higher than 20 should be backed by runtime with built-in multidex capabilty but it\'s not the case here: java.vm.version=\""
const-string v1, "MultiDex is not guaranteed to work in SDK version "
sget-object v2, Landroidx/multidex/MultiDex;->installedApk:Ljava/util/Set;
.line 207
monitor-enter v2
.line 208
:try_start_0
invoke-interface {v2, p1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_0
.line 209
monitor-exit v2
return-void
.line 211
:cond_0
invoke-interface {v2, p1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
const-string v3, "MultiDex"
.line 214
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "java.vm.version"
.line 219
invoke-static {v1}, Ljava/lang/System;->getProperty(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "\""
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
.line 214
invoke-static {v3, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
.line 225
invoke-static {p0}, Landroidx/multidex/MultiDex;->getDexClassloader(Landroid/content/Context;)Ljava/lang/ClassLoader;
move-result-object v0
if-nez v0, :cond_1
.line 227
monitor-exit v2
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_2
return-void
.line 231
:cond_1
:try_start_1
invoke-static {p0}, Landroidx/multidex/MultiDex;->clearOldDexDir(Landroid/content/Context;)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_0
:catchall_0
move-exception v1
:try_start_2
const-string v3, "MultiDex"
const-string v4, "Something went wrong when trying to clear old MultiDex extraction, continuing without cleaning."
.line 233
invoke-static {v3, v4, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 237
:goto_0
invoke-static {p0, p2, p3}, Landroidx/multidex/MultiDex;->getDexDir(Landroid/content/Context;Ljava/io/File;Ljava/lang/String;)Ljava/io/File;
move-result-object p2
.line 241
new-instance p3, Landroidx/multidex/MultiDexExtractor;
invoke-direct {p3, p1, p2}, Landroidx/multidex/MultiDexExtractor;-><init>(Ljava/io/File;Ljava/io/File;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_2
const/4 p1, 0x0
.line 245
:try_start_3
invoke-virtual {p3, p0, p4, p1}, Landroidx/multidex/MultiDexExtractor;->load(Landroid/content/Context;Ljava/lang/String;Z)Ljava/util/List;
move-result-object p1
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
.line 247
:try_start_4
invoke-static {v0, p2, p1}, Landroidx/multidex/MultiDex;->installSecondaryDexes(Ljava/lang/ClassLoader;Ljava/io/File;Ljava/util/List;)V
:try_end_4
.catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_0
.catchall {:try_start_4 .. :try_end_4} :catchall_1
goto :goto_1
:catch_0
move-exception p1
if-eqz p5, :cond_3
:try_start_5
const-string p5, "MultiDex"
const-string v1, "Failed to install extracted secondary dex files, retrying with forced extraction"
.line 253
invoke-static {p5, v1, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
const/4 p1, 0x1
.line 255
invoke-virtual {p3, p0, p4, p1}, Landroidx/multidex/MultiDexExtractor;->load(Landroid/content/Context;Ljava/lang/String;Z)Ljava/util/List;
move-result-object p0
.line 256
invoke-static {v0, p2, p0}, Landroidx/multidex/MultiDex;->installSecondaryDexes(Ljava/lang/ClassLoader;Ljava/io/File;Ljava/util/List;)V
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_1
.line 260
:goto_1
:try_start_6
invoke-virtual {p3}, Landroidx/multidex/MultiDexExtractor;->close()V
:try_end_6
.catch Ljava/io/IOException; {:try_start_6 .. :try_end_6} :catch_1
.catchall {:try_start_6 .. :try_end_6} :catchall_2
const/4 p0, 0x0
goto :goto_2
:catch_1
move-exception p0
:goto_2
if-nez p0, :cond_2
.line 270
:try_start_7
monitor-exit v2
return-void
.line 268
:cond_2
throw p0
:try_end_7
.catchall {:try_start_7 .. :try_end_7} :catchall_2
.line 251
:cond_3
:try_start_8
throw p1
:try_end_8
.catchall {:try_start_8 .. :try_end_8} :catchall_1
:catchall_1
move-exception p0
.line 260
:try_start_9
invoke-virtual {p3}, Landroidx/multidex/MultiDexExtractor;->close()V
:try_end_9
.catch Ljava/io/IOException; {:try_start_9 .. :try_end_9} :catch_2
.catchall {:try_start_9 .. :try_end_9} :catchall_2
.line 265
:catch_2
:try_start_a
throw p0
:catchall_2
move-exception p0
.line 270
monitor-exit v2
:try_end_a
.catchall {:try_start_a .. :try_end_a} :catchall_2
throw p0
.end method
.method private static expandFieldArray(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/NoSuchFieldException;,
Ljava/lang/IllegalArgumentException;,
Ljava/lang/IllegalAccessException;
}
.end annotation
.line 441
invoke-static {p0, p1}, Landroidx/multidex/MultiDex;->findField(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/reflect/Field;
move-result-object p1
.line 442
invoke-virtual {p1, p0}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, [Ljava/lang/Object;
check-cast v0, [Ljava/lang/Object;
.line 444
invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/Class;->getComponentType()Ljava/lang/Class;
move-result-object v1
array-length v2, v0
array-length v3, p2
add-int/2addr v2, v3
.line 443
invoke-static {v1, v2}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;I)Ljava/lang/Object;
move-result-object v1
check-cast v1, [Ljava/lang/Object;
check-cast v1, [Ljava/lang/Object;
.line 445
array-length v2, v0
const/4 v3, 0x0
invoke-static {v0, v3, v1, v3, v2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 446
array-length v0, v0
array-length v2, p2
invoke-static {p2, v3, v1, v0, v2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 447
invoke-virtual {p1, p0, v1}, Ljava/lang/reflect/Field;->set(Ljava/lang/Object;Ljava/lang/Object;)V
return-void
.end method
.method private static findField(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/reflect/Field;
.locals 3
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/NoSuchFieldException;
}
.end annotation
.line 383
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v0
:goto_0
if-eqz v0, :cond_1
.line 385
:try_start_0
invoke-virtual {v0, p1}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;
move-result-object v1
.line 388
invoke-virtual {v1}, Ljava/lang/reflect/Field;->isAccessible()Z
move-result v2
if-nez v2, :cond_0
const/4 v2, 0x1
.line 389
invoke-virtual {v1, v2}, Ljava/lang/reflect/Field;->setAccessible(Z)V
:try_end_0
.catch Ljava/lang/NoSuchFieldException; {:try_start_0 .. :try_end_0} :catch_0
:cond_0
return-object v1
.line 383
:catch_0
invoke-virtual {v0}, Ljava/lang/Class;->getSuperclass()Ljava/lang/Class;
move-result-object v0
goto :goto_0
.line 398
:cond_1
new-instance v0, Ljava/lang/NoSuchFieldException;
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "Field "
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
const-string v1, " not found in "
invoke-virtual {p1, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p0
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/NoSuchFieldException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method private static varargs findMethod(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"Ljava/lang/String;",
"[",
"Ljava/lang/Class<",
"*>;)",
"Ljava/lang/reflect/Method;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/NoSuchMethodException;
}
.end annotation
.line 412
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v0
:goto_0
if-eqz v0, :cond_1
.line 414
:try_start_0
invoke-virtual {v0, p1, p2}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
move-result-object v1
.line 417
invoke-virtual {v1}, Ljava/lang/reflect/Method;->isAccessible()Z
move-result v2
if-nez v2, :cond_0
const/4 v2, 0x1
.line 418
invoke-virtual {v1, v2}, Ljava/lang/reflect/Method;->setAccessible(Z)V
:try_end_0
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0
:cond_0
return-object v1
.line 412
:catch_0
invoke-virtual {v0}, Ljava/lang/Class;->getSuperclass()Ljava/lang/Class;
move-result-object v0
goto :goto_0
.line 427
:cond_1
new-instance v0, Ljava/lang/NoSuchMethodException;
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "Method "
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
const-string v1, " with parameters "
invoke-virtual {p1, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
.line 428
invoke-static {p2}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
move-result-object p2
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object p1
const-string p2, " not found in "
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p0
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/NoSuchMethodException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method private static getApplicationInfo(Landroid/content/Context;)Landroid/content/pm/ApplicationInfo;
.locals 2
.line 315
:try_start_0
invoke-virtual {p0}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;
move-result-object p0
:try_end_0
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
return-object p0
:catch_0
move-exception p0
const-string v0, "MultiDex"
const-string v1, "Failure while trying to obtain ApplicationInfo from Context. Must be running in test mode. Skip patching."
.line 321
invoke-static {v0, v1, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
const/4 p0, 0x0
return-object p0
.end method
.method private static getDexClassloader(Landroid/content/Context;)Ljava/lang/ClassLoader;
.locals 3
const-string v0, "MultiDex"
const/4 v1, 0x0
.line 281
:try_start_0
invoke-virtual {p0}, Landroid/content/Context;->getClassLoader()Ljava/lang/ClassLoader;
move-result-object p0
:try_end_0
.catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_0
.line 293
instance-of v2, p0, Ldalvik/system/BaseDexClassLoader;
if-eqz v2, :cond_0
return-object p0
:cond_0
const-string p0, "Context class loader is null or not dex-capable. Must be running in test mode. Skip patching."
.line 300
invoke-static {v0, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
return-object v1
:catch_0
move-exception p0
const-string v2, "Failure while trying to obtain Context class loader. Must be running in test mode. Skip patching."
.line 287
invoke-static {v0, v2, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
return-object v1
.end method
.method private static getDexDir(Landroid/content/Context;Ljava/io/File;Ljava/lang/String;)Ljava/io/File;
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 478
new-instance v0, Ljava/io/File;
const-string v1, "code_cache"
invoke-direct {v0, p1, v1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 480
:try_start_0
invoke-static {v0}, Landroidx/multidex/MultiDex;->mkdirChecked(Ljava/io/File;)V
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
.line 486
:catch_0
new-instance v0, Ljava/io/File;
invoke-virtual {p0}, Landroid/content/Context;->getFilesDir()Ljava/io/File;
move-result-object p0
invoke-direct {v0, p0, v1}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 487
invoke-static {v0}, Landroidx/multidex/MultiDex;->mkdirChecked(Ljava/io/File;)V
.line 489
:goto_0
new-instance p0, Ljava/io/File;
invoke-direct {p0, v0, p2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 490
invoke-static {p0}, Landroidx/multidex/MultiDex;->mkdirChecked(Ljava/io/File;)V
return-object p0
.end method
.method public static install(Landroid/content/Context;)V
.locals 8
const-string v0, "Installing application"
const-string v1, "MultiDex"
.line 94
invoke-static {v1, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
sget-boolean v0, Landroidx/multidex/MultiDex;->IS_VM_MULTIDEX_CAPABLE:Z
if-eqz v0, :cond_0
const-string p0, "VM has multidex support, MultiDex support library is disabled."
.line 96
invoke-static {v1, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
return-void
.line 106
:cond_0
:try_start_0
invoke-static {p0}, Landroidx/multidex/MultiDex;->getApplicationInfo(Landroid/content/Context;)Landroid/content/pm/ApplicationInfo;
move-result-object v0
if-nez v0, :cond_1
const-string p0, "No ApplicationInfo available, i.e. running on a test Context: MultiDex support library is disabled."
.line 108
invoke-static {v1, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
return-void
.line 113
:cond_1
new-instance v3, Ljava/io/File;
iget-object v2, v0, Landroid/content/pm/ApplicationInfo;->sourceDir:Ljava/lang/String;
invoke-direct {v3, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V
new-instance v4, Ljava/io/File;
iget-object v0, v0, Landroid/content/pm/ApplicationInfo;->dataDir:Ljava/lang/String;
invoke-direct {v4, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
const-string v5, "secondary-dexes"
const-string v6, ""
const/4 v7, 0x1
move-object v2, p0
invoke-static/range {v2 .. v7}, Landroidx/multidex/MultiDex;->doInstallation(Landroid/content/Context;Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Z)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
const-string p0, "install done"
.line 124
invoke-static {v1, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
return-void
:catch_0
move-exception p0
const-string v0, "MultiDex installation failure"
.line 121
invoke-static {v1, v0, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 122
new-instance v0, Ljava/lang/RuntimeException;
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "MultiDex installation failed ("
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
move-result-object p0
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
const-string v1, ")."
invoke-virtual {p0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public static installInstrumentation(Landroid/content/Context;Landroid/content/Context;)V
.locals 14
const-string v0, "Installing instrumentation"
const-string v1, "MultiDex"
.line 140
invoke-static {v1, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
sget-boolean v0, Landroidx/multidex/MultiDex;->IS_VM_MULTIDEX_CAPABLE:Z
if-eqz v0, :cond_0
const-string p0, "VM has multidex support, MultiDex support library is disabled."
.line 143
invoke-static {v1, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
return-void
.line 153
:cond_0
:try_start_0
invoke-static {p0}, Landroidx/multidex/MultiDex;->getApplicationInfo(Landroid/content/Context;)Landroid/content/pm/ApplicationInfo;
move-result-object v0
if-nez v0, :cond_1
const-string p0, "No ApplicationInfo available for instrumentation, i.e. running on a test Context: MultiDex support library is disabled."
.line 155
invoke-static {v1, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
return-void
.line 160
:cond_1
invoke-static {p1}, Landroidx/multidex/MultiDex;->getApplicationInfo(Landroid/content/Context;)Landroid/content/pm/ApplicationInfo;
move-result-object v2
if-nez v2, :cond_2
const-string p0, "No ApplicationInfo available, i.e. running on a test Context: MultiDex support library is disabled."
.line 162
invoke-static {v1, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
return-void
.line 167
:cond_2
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
move-result-object p0
invoke-virtual {v3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
const-string v3, "."
invoke-virtual {p0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v7
.line 169
new-instance v10, Ljava/io/File;
iget-object p0, v2, Landroid/content/pm/ApplicationInfo;->dataDir:Ljava/lang/String;
invoke-direct {v10, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 171
new-instance v4, Ljava/io/File;
iget-object p0, v0, Landroid/content/pm/ApplicationInfo;->sourceDir:Ljava/lang/String;
invoke-direct {v4, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
new-instance p0, Ljava/lang/StringBuilder;
invoke-direct {p0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {p0, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
const-string v0, "secondary-dexes"
invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
const/4 v8, 0x0
move-object v3, p1
move-object v5, v10
invoke-static/range {v3 .. v8}, Landroidx/multidex/MultiDex;->doInstallation(Landroid/content/Context;Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Z)V
.line 178
new-instance v9, Ljava/io/File;
iget-object p0, v2, Landroid/content/pm/ApplicationInfo;->sourceDir:Ljava/lang/String;
invoke-direct {v9, p0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
const-string v11, "secondary-dexes"
const-string v12, ""
const/4 v13, 0x0
move-object v8, p1
invoke-static/range {v8 .. v13}, Landroidx/multidex/MultiDex;->doInstallation(Landroid/content/Context;Ljava/io/File;Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Z)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
const-string p0, "Installation done"
.line 188
invoke-static {v1, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
return-void
:catch_0
move-exception p0
const-string p1, "MultiDex installation failure"
.line 185
invoke-static {v1, p1, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
.line 186
new-instance p1, Ljava/lang/RuntimeException;
new-instance v0, Ljava/lang/StringBuilder;
const-string v1, "MultiDex installation failed ("
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
move-result-object p0
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
const-string v0, ")."
invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {p1, p0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method private static installSecondaryDexes(Ljava/lang/ClassLoader;Ljava/io/File;Ljava/util/List;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/ClassLoader;",
"Ljava/io/File;",
"Ljava/util/List<",
"+",
"Ljava/io/File;",
">;)V"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/IllegalArgumentException;,
Ljava/lang/IllegalAccessException;,
Ljava/lang/NoSuchFieldException;,
Ljava/lang/reflect/InvocationTargetException;,
Ljava/lang/NoSuchMethodException;,
Ljava/io/IOException;,
Ljava/lang/SecurityException;,
Ljava/lang/ClassNotFoundException;,
Ljava/lang/InstantiationException;
}
.end annotation
.line 363
invoke-interface {p2}, Ljava/util/List;->isEmpty()Z
move-result v0
if-nez v0, :cond_0
.line 365
invoke-static {p0, p2, p1}, Landroidx/multidex/MultiDex$V19;->install(Ljava/lang/ClassLoader;Ljava/util/List;Ljava/io/File;)V
:cond_0
return-void
.end method
.method static isVMMultidexCapable(Ljava/lang/String;)Z
.locals 5
const/4 v0, 0x0
if-eqz p0, :cond_3
.line 336
new-instance v1, Ljava/util/StringTokenizer;
const-string v2, "."
invoke-direct {v1, p0, v2}, Ljava/util/StringTokenizer;-><init>(Ljava/lang/String;Ljava/lang/String;)V
.line 337
invoke-virtual {v1}, Ljava/util/StringTokenizer;->hasMoreTokens()Z
move-result v2
const/4 v3, 0x0
if-eqz v2, :cond_0
invoke-virtual {v1}, Ljava/util/StringTokenizer;->nextToken()Ljava/lang/String;
move-result-object v2
goto :goto_0
:cond_0
move-object v2, v3
.line 338
:goto_0
invoke-virtual {v1}, Ljava/util/StringTokenizer;->hasMoreTokens()Z
move-result v4
if-eqz v4, :cond_1
invoke-virtual {v1}, Ljava/util/StringTokenizer;->nextToken()Ljava/lang/String;
move-result-object v3
:cond_1
if-eqz v2, :cond_3
if-eqz v3, :cond_3
.line 341
:try_start_0
invoke-static {v2}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v1
.line 342
invoke-static {v3}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v2
:try_end_0
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0
const/4 v3, 0x1
const/4 v4, 0x2
if-gt v1, v4, :cond_2
if-ne v1, v4, :cond_3
if-lt v2, v3, :cond_3
:cond_2
move v0, v3
.line 351
:catch_0
:cond_3
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "VM with version "
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
if-eqz v0, :cond_4
const-string v1, " has multidex support"
goto :goto_1
:cond_4
const-string v1, " does not have multidex support"
:goto_1
invoke-virtual {p0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
const-string v1, "MultiDex"
invoke-static {v1, p0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
return v0
.end method
.method private static mkdirChecked(Ljava/io/File;)V
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
.line 495
invoke-virtual {p0}, Ljava/io/File;->mkdir()Z
.line 496
invoke-virtual {p0}, Ljava/io/File;->isDirectory()Z
move-result v0
if-nez v0, :cond_1
.line 497
invoke-virtual {p0}, Ljava/io/File;->getParentFile()Ljava/io/File;
move-result-object v0
const-string v1, "Failed to create dir "
const-string v2, "MultiDex"
if-nez v0, :cond_0
.line 499
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p0}, Ljava/io/File;->getPath()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, ". Parent file is null."
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_0
.line 501
:cond_0
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p0}, Ljava/io/File;->getPath()Ljava/lang/String;
move-result-object v1
invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const-string v3, ". parent file is a dir "
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
.line 502
invoke-virtual {v0}, Ljava/io/File;->isDirectory()Z
move-result v3
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object v1
const-string v3, ", a file "
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
.line 503
invoke-virtual {v0}, Ljava/io/File;->isFile()Z
move-result v3
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object v1
const-string v3, ", exists "
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
.line 504
invoke-virtual {v0}, Ljava/io/File;->exists()Z
move-result v3
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object v1
const-string v3, ", readable "
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
.line 505
invoke-virtual {v0}, Ljava/io/File;->canRead()Z
move-result v3
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object v1
const-string v3, ", writable "
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
.line 506
invoke-virtual {v0}, Ljava/io/File;->canWrite()Z
move-result v0
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
.line 501
invoke-static {v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 508
:goto_0
new-instance v0, Ljava/io/IOException;
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "Failed to create directory "
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p0}, Ljava/io/File;->getPath()Ljava/lang/String;
move-result-object p0
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p0
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
throw v0
:cond_1
return-void
.end method