.class final Landroidx/multidex/MultiDexExtractor; .super Ljava/lang/Object; .source "MultiDexExtractor.java" # interfaces .implements Ljava/io/Closeable; # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Landroidx/multidex/MultiDexExtractor$ExtractedDex; } .end annotation # static fields .field private static final BUFFER_SIZE:I = 0x4000 .field private static final DEX_PREFIX:Ljava/lang/String; = "classes" .field static final DEX_SUFFIX:Ljava/lang/String; = ".dex" .field private static final EXTRACTED_NAME_EXT:Ljava/lang/String; = ".classes" .field static final EXTRACTED_SUFFIX:Ljava/lang/String; = ".zip" .field private static final KEY_CRC:Ljava/lang/String; = "crc" .field private static final KEY_DEX_CRC:Ljava/lang/String; = "dex.crc." .field private static final KEY_DEX_NUMBER:Ljava/lang/String; = "dex.number" .field private static final KEY_DEX_TIME:Ljava/lang/String; = "dex.time." .field private static final KEY_TIME_STAMP:Ljava/lang/String; = "timestamp" .field private static final LOCK_FILENAME:Ljava/lang/String; = "MultiDex.lock" .field private static final MAX_EXTRACT_ATTEMPTS:I = 0x3 .field private static final NO_VALUE:J = -0x1L .field private static final PREFS_FILE:Ljava/lang/String; = "multidex.version" .field private static final TAG:Ljava/lang/String; = "MultiDex" # instance fields .field private final cacheLock:Ljava/nio/channels/FileLock; .field private final dexDir:Ljava/io/File; .field private final lockChannel:Ljava/nio/channels/FileChannel; .field private final lockRaf:Ljava/io/RandomAccessFile; .field private final sourceApk:Ljava/io/File; .field private final sourceCrc:J # direct methods .method constructor (Ljava/io/File;Ljava/io/File;)V .locals 5 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation const-string v0, "Blocking on lock " .line 94 invoke-direct {p0}, Ljava/lang/Object;->()V .line 95 new-instance v1, Ljava/lang/StringBuilder; const-string v2, "MultiDexExtractor(" invoke-direct {v1, v2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {p1}, Ljava/io/File;->getPath()Ljava/lang/String; move-result-object v2 invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, ", " invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {p2}, Ljava/io/File;->getPath()Ljava/lang/String; move-result-object v2 invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, ")" invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 const-string v2, "MultiDex" invoke-static {v2, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I iput-object p1, p0, Landroidx/multidex/MultiDexExtractor;->sourceApk:Ljava/io/File; iput-object p2, p0, Landroidx/multidex/MultiDexExtractor;->dexDir:Ljava/io/File; .line 98 invoke-static {p1}, Landroidx/multidex/MultiDexExtractor;->getZipCrc(Ljava/io/File;)J move-result-wide v3 iput-wide v3, p0, Landroidx/multidex/MultiDexExtractor;->sourceCrc:J .line 99 new-instance p1, Ljava/io/File; const-string v1, "MultiDex.lock" invoke-direct {p1, p2, v1}, Ljava/io/File;->(Ljava/io/File;Ljava/lang/String;)V .line 100 new-instance p2, Ljava/io/RandomAccessFile; const-string v1, "rw" invoke-direct {p2, p1, v1}, Ljava/io/RandomAccessFile;->(Ljava/io/File;Ljava/lang/String;)V iput-object p2, p0, Landroidx/multidex/MultiDexExtractor;->lockRaf:Ljava/io/RandomAccessFile; .line 102 :try_start_0 invoke-virtual {p2}, Ljava/io/RandomAccessFile;->getChannel()Ljava/nio/channels/FileChannel; move-result-object p2 iput-object p2, p0, Landroidx/multidex/MultiDexExtractor;->lockChannel:Ljava/nio/channels/FileChannel; :try_end_0 .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1 .catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_0} :catch_1 .catch Ljava/lang/Error; {:try_start_0 .. :try_end_0} :catch_1 .line 104 :try_start_1 new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1, v0}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {p1}, Ljava/io/File;->getPath()Ljava/lang/String; move-result-object v0 invoke-virtual {v1, v0}, 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;->i(Ljava/lang/String;Ljava/lang/String;)I .line 105 invoke-virtual {p2}, Ljava/nio/channels/FileChannel;->lock()Ljava/nio/channels/FileLock; move-result-object p2 iput-object p2, p0, Landroidx/multidex/MultiDexExtractor;->cacheLock:Ljava/nio/channels/FileLock; :try_end_1 .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0 .catch Ljava/lang/RuntimeException; {:try_start_1 .. :try_end_1} :catch_0 .catch Ljava/lang/Error; {:try_start_1 .. :try_end_1} :catch_0 .line 110 :try_start_2 new-instance p2, Ljava/lang/StringBuilder; invoke-direct {p2}, Ljava/lang/StringBuilder;->()V invoke-virtual {p1}, Ljava/io/File;->getPath()Ljava/lang/String; move-result-object p1 invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p1 const-string p2, " locked" invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 invoke-static {v2, p1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I return-void :catch_0 move-exception p1 iget-object p2, p0, Landroidx/multidex/MultiDexExtractor;->lockChannel:Ljava/nio/channels/FileChannel; .line 107 invoke-static {p2}, Landroidx/multidex/MultiDexExtractor;->closeQuietly(Ljava/io/Closeable;)V .line 108 throw p1 :try_end_2 .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_1 .catch Ljava/lang/RuntimeException; {:try_start_2 .. :try_end_2} :catch_1 .catch Ljava/lang/Error; {:try_start_2 .. :try_end_2} :catch_1 :catch_1 move-exception p1 iget-object p0, p0, Landroidx/multidex/MultiDexExtractor;->lockRaf:Ljava/io/RandomAccessFile; .line 112 invoke-static {p0}, Landroidx/multidex/MultiDexExtractor;->closeQuietly(Ljava/io/Closeable;)V .line 113 throw p1 .end method .method private clearDexDir()V .locals 7 iget-object v0, p0, Landroidx/multidex/MultiDexExtractor;->dexDir:Ljava/io/File; .line 354 new-instance v1, Landroidx/multidex/MultiDexExtractor$1; invoke-direct {v1, p0}, Landroidx/multidex/MultiDexExtractor$1;->(Landroidx/multidex/MultiDexExtractor;)V invoke-virtual {v0, v1}, Ljava/io/File;->listFiles(Ljava/io/FileFilter;)[Ljava/io/File; move-result-object v0 const-string v1, "MultiDex" if-nez v0, :cond_0 .line 361 new-instance v0, Ljava/lang/StringBuilder; const-string v2, "Failed to list secondary dex dir content (" invoke-direct {v0, v2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V iget-object p0, p0, Landroidx/multidex/MultiDexExtractor;->dexDir:Ljava/io/File; invoke-virtual {p0}, Ljava/io/File;->getPath()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-static {v1, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I return-void .line 364 :cond_0 array-length p0, v0 const/4 v2, 0x0 :goto_0 if-ge v2, p0, :cond_2 aget-object v3, v0, v2 .line 365 new-instance v4, Ljava/lang/StringBuilder; const-string v5, "Trying to delete old file " invoke-direct {v4, v5}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v3}, Ljava/io/File;->getPath()Ljava/lang/String; move-result-object v5 invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v4 const-string v5, " of size " invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v4 .line 366 invoke-virtual {v3}, Ljava/io/File;->length()J move-result-wide v5 invoke-virtual {v4, v5, v6}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder; move-result-object v4 invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v4 .line 365 invoke-static {v1, v4}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I .line 367 invoke-virtual {v3}, Ljava/io/File;->delete()Z move-result v4 if-nez v4, :cond_1 .line 368 new-instance v4, Ljava/lang/StringBuilder; const-string v5, "Failed to delete old file " invoke-direct {v4, v5}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v3}, Ljava/io/File;->getPath()Ljava/lang/String; move-result-object v3 invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v3 invoke-static {v1, v3}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I goto :goto_1 .line 370 :cond_1 new-instance v4, Ljava/lang/StringBuilder; const-string v5, "Deleted old file " invoke-direct {v4, v5}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v3}, Ljava/io/File;->getPath()Ljava/lang/String; move-result-object v3 invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v3 invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v3 invoke-static {v1, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I :goto_1 add-int/lit8 v2, v2, 0x1 goto :goto_0 :cond_2 return-void .end method .method private static closeQuietly(Ljava/io/Closeable;)V .locals 2 .line 422 :try_start_0 invoke-interface {p0}, Ljava/io/Closeable;->close()V :try_end_0 .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_0 :catch_0 move-exception p0 const-string v0, "MultiDex" const-string v1, "Failed to close resource" .line 424 invoke-static {v0, v1, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I :goto_0 return-void .end method .method private static extract(Ljava/util/zip/ZipFile;Ljava/util/zip/ZipEntry;Ljava/io/File;Ljava/lang/String;)V .locals 5 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException;, Ljava/io/FileNotFoundException; } .end annotation .line 378 invoke-virtual {p0, p1}, Ljava/util/zip/ZipFile;->getInputStream(Ljava/util/zip/ZipEntry;)Ljava/io/InputStream; move-result-object p0 .line 381 new-instance v0, Ljava/lang/StringBuilder; const-string v1, "tmp-" invoke-direct {v0, v1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p3 invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p3 const-string v0, ".zip" .line 382 invoke-virtual {p2}, Ljava/io/File;->getParentFile()Ljava/io/File; move-result-object v1 .line 381 invoke-static {p3, v0, v1}, Ljava/io/File;->createTempFile(Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)Ljava/io/File; move-result-object p3 .line 383 new-instance v0, Ljava/lang/StringBuilder; const-string v1, "Extracting " invoke-direct {v0, v1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {p3}, 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 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 const-string v1, "MultiDex" invoke-static {v1, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I .line 385 :try_start_0 new-instance v0, Ljava/util/zip/ZipOutputStream; new-instance v2, Ljava/io/BufferedOutputStream; new-instance v3, Ljava/io/FileOutputStream; invoke-direct {v3, p3}, Ljava/io/FileOutputStream;->(Ljava/io/File;)V invoke-direct {v2, v3}, Ljava/io/BufferedOutputStream;->(Ljava/io/OutputStream;)V invoke-direct {v0, v2}, Ljava/util/zip/ZipOutputStream;->(Ljava/io/OutputStream;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_1 .line 387 :try_start_1 new-instance v2, Ljava/util/zip/ZipEntry; const-string v3, "classes.dex" invoke-direct {v2, v3}, Ljava/util/zip/ZipEntry;->(Ljava/lang/String;)V .line 389 invoke-virtual {p1}, Ljava/util/zip/ZipEntry;->getTime()J move-result-wide v3 invoke-virtual {v2, v3, v4}, Ljava/util/zip/ZipEntry;->setTime(J)V .line 390 invoke-virtual {v0, v2}, Ljava/util/zip/ZipOutputStream;->putNextEntry(Ljava/util/zip/ZipEntry;)V const/16 p1, 0x4000 new-array p1, p1, [B .line 393 invoke-virtual {p0, p1}, Ljava/io/InputStream;->read([B)I move-result v2 :goto_0 const/4 v3, -0x1 if-eq v2, v3, :cond_0 const/4 v3, 0x0 .line 395 invoke-virtual {v0, p1, v3, v2}, Ljava/util/zip/ZipOutputStream;->write([BII)V .line 396 invoke-virtual {p0, p1}, Ljava/io/InputStream;->read([B)I move-result v2 goto :goto_0 .line 398 :cond_0 invoke-virtual {v0}, Ljava/util/zip/ZipOutputStream;->closeEntry()V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 .line 400 :try_start_2 invoke-virtual {v0}, Ljava/util/zip/ZipOutputStream;->close()V .line 402 invoke-virtual {p3}, Ljava/io/File;->setReadOnly()Z move-result p1 if-eqz p1, :cond_2 .line 406 new-instance p1, Ljava/lang/StringBuilder; invoke-direct {p1}, Ljava/lang/StringBuilder;->()V const-string v0, "Renaming to " invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p2}, Ljava/io/File;->getPath()Ljava/lang/String; move-result-object v0 invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 invoke-static {v1, p1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I .line 407 invoke-virtual {p3, p2}, Ljava/io/File;->renameTo(Ljava/io/File;)Z move-result p1 :try_end_2 .catchall {:try_start_2 .. :try_end_2} :catchall_1 if-eqz p1, :cond_1 .line 412 invoke-static {p0}, Landroidx/multidex/MultiDexExtractor;->closeQuietly(Ljava/io/Closeable;)V .line 413 invoke-virtual {p3}, Ljava/io/File;->delete()Z return-void .line 408 :cond_1 :try_start_3 new-instance p1, Ljava/io/IOException; new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V const-string v1, "Failed to rename \"" invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {p3}, Ljava/io/File;->getAbsolutePath()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, "\" to \"" invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 .line 409 invoke-virtual {p2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String; move-result-object p2 invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p2 const-string v0, "\"" invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p2 invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p2 invoke-direct {p1, p2}, Ljava/io/IOException;->(Ljava/lang/String;)V throw p1 .line 403 :cond_2 new-instance p1, Ljava/io/IOException; new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V const-string v1, "Failed to mark readonly \"" invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {p3}, Ljava/io/File;->getAbsolutePath()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, "\" (tmp of \"" invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 .line 404 invoke-virtual {p2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String; move-result-object p2 invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p2 const-string v0, "\")" invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p2 invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p2 invoke-direct {p1, p2}, Ljava/io/IOException;->(Ljava/lang/String;)V throw p1 :catchall_0 move-exception p1 .line 400 invoke-virtual {v0}, Ljava/util/zip/ZipOutputStream;->close()V throw p1 :try_end_3 .catchall {:try_start_3 .. :try_end_3} :catchall_1 :catchall_1 move-exception p1 .line 412 invoke-static {p0}, Landroidx/multidex/MultiDexExtractor;->closeQuietly(Ljava/io/Closeable;)V .line 413 invoke-virtual {p3}, Ljava/io/File;->delete()Z throw p1 .end method .method private static getMultiDexPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences; .locals 2 const-string v0, "multidex.version" const/4 v1, 0x4 .line 344 invoke-virtual {p0, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences; move-result-object p0 return-object p0 .end method .method private static getTimeStamp(Ljava/io/File;)J .locals 4 .line 224 invoke-virtual {p0}, Ljava/io/File;->lastModified()J move-result-wide v0 const-wide/16 v2, -0x1 cmp-long p0, v0, v2 if-nez p0, :cond_0 const-wide/16 v2, 0x1 sub-long/2addr v0, v2 :cond_0 return-wide v0 .end method .method private static getZipCrc(Ljava/io/File;)J .locals 4 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 234 invoke-static {p0}, Landroidx/multidex/ZipUtil;->getZipCrc(Ljava/io/File;)J move-result-wide v0 const-wide/16 v2, -0x1 cmp-long p0, v0, v2 if-nez p0, :cond_0 const-wide/16 v2, 0x1 sub-long/2addr v0, v2 :cond_0 return-wide v0 .end method .method private static isModified(Landroid/content/Context;Ljava/io/File;JLjava/lang/String;)Z .locals 7 .line 218 invoke-static {p0}, Landroidx/multidex/MultiDexExtractor;->getMultiDexPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences; move-result-object p0 .line 219 new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V invoke-virtual {v0, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 const-string v1, "timestamp" 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 const-wide/16 v1, -0x1 invoke-interface {p0, v0, v1, v2}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J move-result-wide v3 invoke-static {p1}, Landroidx/multidex/MultiDexExtractor;->getTimeStamp(Ljava/io/File;)J move-result-wide v5 cmp-long p1, v3, v5 if-nez p1, :cond_1 new-instance p1, Ljava/lang/StringBuilder; invoke-direct {p1}, Ljava/lang/StringBuilder;->()V invoke-virtual {p1, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p1 const-string p4, "crc" invoke-virtual {p1, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 .line 220 invoke-interface {p0, p1, v1, v2}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J move-result-wide p0 cmp-long p0, p0, p2 if-eqz p0, :cond_0 goto :goto_0 :cond_0 const/4 p0, 0x0 goto :goto_1 :cond_1 :goto_0 const/4 p0, 0x1 :goto_1 return p0 .end method .method private loadExistingExtractions(Landroid/content/Context;Ljava/lang/String;)Ljava/util/List; .locals 15 .annotation system Ldalvik/annotation/Signature; value = { "(", "Landroid/content/Context;", "Ljava/lang/String;", ")", "Ljava/util/List<", "Landroidx/multidex/MultiDexExtractor$ExtractedDex;", ">;" } .end annotation .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation move-object v0, p0 move-object/from16 v1, p2 const-string v2, "MultiDex" const-string v3, "loading existing secondary dex files" .line 176 invoke-static {v2, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I .line 178 new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V iget-object v3, v0, Landroidx/multidex/MultiDexExtractor;->sourceApk:Ljava/io/File; invoke-virtual {v3}, Ljava/io/File;->getName()Ljava/lang/String; move-result-object v3 invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 const-string v3, ".classes" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v2 .line 179 invoke-static/range {p1 .. p1}, Landroidx/multidex/MultiDexExtractor;->getMultiDexPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences; move-result-object v3 .line 180 new-instance v4, Ljava/lang/StringBuilder; invoke-direct {v4}, Ljava/lang/StringBuilder;->()V invoke-virtual {v4, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v4 const-string v5, "dex.number" invoke-virtual {v4, v5}, 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 const/4 v5, 0x1 invoke-interface {v3, v4, v5}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I move-result v4 .line 181 new-instance v5, Ljava/util/ArrayList; add-int/lit8 v6, v4, -0x1 invoke-direct {v5, v6}, Ljava/util/ArrayList;->(I)V const/4 v6, 0x2 :goto_0 if-gt v6, v4, :cond_2 .line 184 new-instance v7, Ljava/lang/StringBuilder; invoke-direct {v7}, Ljava/lang/StringBuilder;->()V invoke-virtual {v7, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v7 invoke-virtual {v7, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v7 const-string v8, ".zip" invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v7 invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v7 .line 185 new-instance v8, Landroidx/multidex/MultiDexExtractor$ExtractedDex; iget-object v9, v0, Landroidx/multidex/MultiDexExtractor;->dexDir:Ljava/io/File; invoke-direct {v8, v9, v7}, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->(Ljava/io/File;Ljava/lang/String;)V .line 186 invoke-virtual {v8}, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->isFile()Z move-result v7 if-eqz v7, :cond_1 .line 187 invoke-static {v8}, Landroidx/multidex/MultiDexExtractor;->getZipCrc(Ljava/io/File;)J move-result-wide v9 iput-wide v9, v8, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->crc:J .line 188 new-instance v7, Ljava/lang/StringBuilder; invoke-direct {v7}, Ljava/lang/StringBuilder;->()V invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v7 const-string v9, "dex.crc." invoke-virtual {v7, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v7 invoke-virtual {v7, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v7 invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v7 const-wide/16 v9, -0x1 invoke-interface {v3, v7, v9, v10}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J move-result-wide v11 .line 190 new-instance v7, Ljava/lang/StringBuilder; invoke-direct {v7}, Ljava/lang/StringBuilder;->()V invoke-virtual {v7, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v7 const-string v13, "dex.time." invoke-virtual {v7, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v7 invoke-virtual {v7, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v7 invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v7 invoke-interface {v3, v7, v9, v10}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J move-result-wide v9 .line 192 invoke-virtual {v8}, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->lastModified()J move-result-wide v13 cmp-long v7, v9, v13 if-nez v7, :cond_0 move-object v7, v2 move-object/from16 p1, v3 .line 193 iget-wide v2, v8, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->crc:J cmp-long v2, v11, v2 if-nez v2, :cond_0 .line 201 invoke-interface {v5, v8}, Ljava/util/List;->add(Ljava/lang/Object;)Z add-int/lit8 v6, v6, 0x1 move-object/from16 v3, p1 move-object v2, v7 goto :goto_0 .line 195 :cond_0 new-instance v0, Ljava/io/IOException; new-instance v2, Ljava/lang/StringBuilder; const-string v3, "Invalid extracted dex: " invoke-direct {v2, v3}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-virtual {v2, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object v2 const-string v3, " (key \"" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, "\"), expected modification time: " invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1, v9, v10}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, ", modification time: " invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1, v13, v14}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, ", expected crc: " invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1, v11, v12}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, ", file crc: " invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 iget-wide v2, v8, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->crc:J invoke-virtual {v1, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Ljava/io/IOException;->(Ljava/lang/String;)V throw v0 .line 203 :cond_1 new-instance v0, Ljava/io/IOException; new-instance v1, Ljava/lang/StringBuilder; const-string v2, "Missing extracted secondary dex file \'" invoke-direct {v1, v2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V .line 204 invoke-virtual {v8}, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->getPath()Ljava/lang/String; move-result-object v2 invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, "\'" invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 invoke-direct {v0, v1}, Ljava/io/IOException;->(Ljava/lang/String;)V throw v0 :cond_2 return-object v5 .end method .method private performExtractions()Ljava/util/List; .locals 14 .annotation system Ldalvik/annotation/Signature; value = { "()", "Ljava/util/List<", "Landroidx/multidex/MultiDexExtractor$ExtractedDex;", ">;" } .end annotation .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation const-string v0, "Failed to close resource" const-string v1, "MultiDex" .line 244 new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V iget-object v3, p0, Landroidx/multidex/MultiDexExtractor;->sourceApk:Ljava/io/File; invoke-virtual {v3}, Ljava/io/File;->getName()Ljava/lang/String; move-result-object v3 invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 const-string v3, ".classes" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v2 .line 249 invoke-direct {p0}, Landroidx/multidex/MultiDexExtractor;->clearDexDir()V .line 251 new-instance v3, Ljava/util/ArrayList; invoke-direct {v3}, Ljava/util/ArrayList;->()V .line 253 new-instance v4, Ljava/util/zip/ZipFile; iget-object v5, p0, Landroidx/multidex/MultiDexExtractor;->sourceApk:Ljava/io/File; invoke-direct {v4, v5}, Ljava/util/zip/ZipFile;->(Ljava/io/File;)V :try_start_0 const-string v5, "classes2.dex" .line 258 invoke-virtual {v4, v5}, Ljava/util/zip/ZipFile;->getEntry(Ljava/lang/String;)Ljava/util/zip/ZipEntry; move-result-object v5 const/4 v6, 0x2 :goto_0 if-eqz v5, :cond_4 .line 260 new-instance v7, Ljava/lang/StringBuilder; invoke-direct {v7}, Ljava/lang/StringBuilder;->()V invoke-virtual {v7, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v7 invoke-virtual {v7, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v7 const-string v8, ".zip" invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v7 invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v7 .line 261 new-instance v8, Landroidx/multidex/MultiDexExtractor$ExtractedDex; iget-object v9, p0, Landroidx/multidex/MultiDexExtractor;->dexDir:Ljava/io/File; invoke-direct {v8, v9, v7}, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->(Ljava/io/File;Ljava/lang/String;)V .line 262 invoke-interface {v3, v8}, Ljava/util/List;->add(Ljava/lang/Object;)Z .line 264 new-instance v7, Ljava/lang/StringBuilder; invoke-direct {v7}, Ljava/lang/StringBuilder;->()V const-string v9, "Extraction is needed for file " invoke-virtual {v7, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v7 invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object v7 invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v7 invoke-static {v1, v7}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I const/4 v7, 0x0 move v9, v7 move v10, v9 :cond_0 :goto_1 const/4 v11, 0x3 if-ge v9, v11, :cond_2 if-nez v10, :cond_2 add-int/lit8 v9, v9, 0x1 .line 272 invoke-static {v4, v5, v8, v2}, Landroidx/multidex/MultiDexExtractor;->extract(Ljava/util/zip/ZipFile;Ljava/util/zip/ZipEntry;Ljava/io/File;Ljava/lang/String;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 276 :try_start_1 invoke-static {v8}, Landroidx/multidex/MultiDexExtractor;->getZipCrc(Ljava/io/File;)J move-result-wide v10 iput-wide v10, v8, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->crc:J :try_end_1 .catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0 .catchall {:try_start_1 .. :try_end_1} :catchall_0 const/4 v10, 0x1 goto :goto_2 :catch_0 move-exception v10 .line 280 :try_start_2 new-instance v11, Ljava/lang/StringBuilder; invoke-direct {v11}, Ljava/lang/StringBuilder;->()V const-string v12, "Failed to read crc from " invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v11 invoke-virtual {v8}, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->getAbsolutePath()Ljava/lang/String; move-result-object v12 invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v11 invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v11 invoke-static {v1, v11, v10}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I move v10, v7 .line 284 :goto_2 new-instance v11, Ljava/lang/StringBuilder; invoke-direct {v11}, Ljava/lang/StringBuilder;->()V const-string v12, "Extraction " invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v11 if-eqz v10, :cond_1 const-string v12, "succeeded" goto :goto_3 :cond_1 const-string v12, "failed" :goto_3 invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v11 const-string v12, " \'" invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v11 .line 285 invoke-virtual {v8}, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->getAbsolutePath()Ljava/lang/String; move-result-object v12 invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v11 const-string v12, "\': length " invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v11 .line 286 invoke-virtual {v8}, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->length()J move-result-wide v12 invoke-virtual {v11, v12, v13}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder; move-result-object v11 const-string v12, " - crc: " invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v11 iget-wide v12, v8, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->crc:J invoke-virtual {v11, v12, v13}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder; move-result-object v11 invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v11 .line 284 invoke-static {v1, v11}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I if-nez v10, :cond_0 .line 289 invoke-virtual {v8}, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->delete()Z .line 290 invoke-virtual {v8}, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->exists()Z move-result v11 if-eqz v11, :cond_0 .line 291 new-instance v11, Ljava/lang/StringBuilder; invoke-direct {v11}, Ljava/lang/StringBuilder;->()V const-string v12, "Failed to delete corrupted secondary dex \'" invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v11 .line 292 invoke-virtual {v8}, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->getPath()Ljava/lang/String; move-result-object v12 invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v11 const-string v12, "\'" invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v11 invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v11 .line 291 invoke-static {v1, v11}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I goto/16 :goto_1 :cond_2 if-eqz v10, :cond_3 add-int/lit8 v6, v6, 0x1 .line 302 new-instance v5, Ljava/lang/StringBuilder; invoke-direct {v5}, Ljava/lang/StringBuilder;->()V const-string v7, "classes" invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v5 invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v5 const-string v7, ".dex" invoke-virtual {v5, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v5 invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v5 invoke-virtual {v4, v5}, Ljava/util/zip/ZipFile;->getEntry(Ljava/lang/String;)Ljava/util/zip/ZipEntry; move-result-object v5 goto/16 :goto_0 .line 297 :cond_3 new-instance p0, Ljava/io/IOException; new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V const-string v3, "Could not create zip file " invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 .line 298 invoke-virtual {v8}, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->getAbsolutePath()Ljava/lang/String; move-result-object v3 invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 const-string v3, " for secondary dex (" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v2 const-string v3, ")" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v2 invoke-direct {p0, v2}, Ljava/io/IOException;->(Ljava/lang/String;)V throw p0 :try_end_2 .catchall {:try_start_2 .. :try_end_2} :catchall_0 .line 306 :cond_4 :try_start_3 invoke-virtual {v4}, Ljava/util/zip/ZipFile;->close()V :try_end_3 .catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_1 goto :goto_4 :catch_1 move-exception p0 .line 308 invoke-static {v1, v0, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I :goto_4 return-object v3 :catchall_0 move-exception p0 .line 306 :try_start_4 invoke-virtual {v4}, Ljava/util/zip/ZipFile;->close()V :try_end_4 .catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_2 goto :goto_5 :catch_2 move-exception v2 .line 308 invoke-static {v1, v0, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I .line 309 :goto_5 throw p0 .end method .method private static putStoredApkInfo(Landroid/content/Context;Ljava/lang/String;JJLjava/util/List;)V .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Landroid/content/Context;", "Ljava/lang/String;", "JJ", "Ljava/util/List<", "Landroidx/multidex/MultiDexExtractor$ExtractedDex;", ">;)V" } .end annotation .line 321 invoke-static {p0}, Landroidx/multidex/MultiDexExtractor;->getMultiDexPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences; move-result-object p0 .line 322 invoke-interface {p0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor; move-result-object p0 .line 323 new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 const-string v1, "timestamp" 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-interface {p0, v0, p2, p3}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor; .line 324 new-instance p2, Ljava/lang/StringBuilder; invoke-direct {p2}, Ljava/lang/StringBuilder;->()V invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p2 const-string p3, "crc" invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p2 invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p2 invoke-interface {p0, p2, p4, p5}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor; .line 325 new-instance p2, Ljava/lang/StringBuilder; invoke-direct {p2}, Ljava/lang/StringBuilder;->()V invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p2 const-string p3, "dex.number" invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p2 invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p2 invoke-interface {p6}, Ljava/util/List;->size()I move-result p3 add-int/lit8 p3, p3, 0x1 invoke-interface {p0, p2, p3}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor; .line 328 invoke-interface {p6}, Ljava/util/List;->iterator()Ljava/util/Iterator; move-result-object p2 const/4 p3, 0x2 :goto_0 invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z move-result p4 if-eqz p4, :cond_0 invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object p4 check-cast p4, Landroidx/multidex/MultiDexExtractor$ExtractedDex; .line 329 new-instance p5, Ljava/lang/StringBuilder; invoke-direct {p5}, Ljava/lang/StringBuilder;->()V invoke-virtual {p5, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p5 const-string p6, "dex.crc." invoke-virtual {p5, p6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p5 invoke-virtual {p5, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object p5 invoke-virtual {p5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p5 iget-wide v0, p4, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->crc:J invoke-interface {p0, p5, v0, v1}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor; .line 330 new-instance p5, Ljava/lang/StringBuilder; invoke-direct {p5}, Ljava/lang/StringBuilder;->()V invoke-virtual {p5, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p5 const-string p6, "dex.time." invoke-virtual {p5, p6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p5 invoke-virtual {p5, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object p5 invoke-virtual {p5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p5 invoke-virtual {p4}, Landroidx/multidex/MultiDexExtractor$ExtractedDex;->lastModified()J move-result-wide v0 invoke-interface {p0, p5, v0, v1}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor; add-int/lit8 p3, p3, 0x1 goto :goto_0 .line 336 :cond_0 invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->commit()Z return-void .end method # virtual methods .method public close()V .locals 1 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation iget-object v0, p0, Landroidx/multidex/MultiDexExtractor;->cacheLock:Ljava/nio/channels/FileLock; .line 163 invoke-virtual {v0}, Ljava/nio/channels/FileLock;->release()V iget-object v0, p0, Landroidx/multidex/MultiDexExtractor;->lockChannel:Ljava/nio/channels/FileChannel; .line 164 invoke-virtual {v0}, Ljava/nio/channels/FileChannel;->close()V iget-object p0, p0, Landroidx/multidex/MultiDexExtractor;->lockRaf:Ljava/io/RandomAccessFile; .line 165 invoke-virtual {p0}, Ljava/io/RandomAccessFile;->close()V return-void .end method .method load(Landroid/content/Context;Ljava/lang/String;Z)Ljava/util/List; .locals 9 .annotation system Ldalvik/annotation/Signature; value = { "(", "Landroid/content/Context;", "Ljava/lang/String;", "Z)", "Ljava/util/List<", "+", "Ljava/io/File;", ">;" } .end annotation .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 128 new-instance v0, Ljava/lang/StringBuilder; const-string v1, "MultiDexExtractor.load(" invoke-direct {v0, v1}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V iget-object v1, p0, Landroidx/multidex/MultiDexExtractor;->sourceApk:Ljava/io/File; invoke-virtual {v1}, 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, ", " invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0, p2}, 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 const-string v1, "MultiDex" invoke-static {v1, v0}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I iget-object v0, p0, Landroidx/multidex/MultiDexExtractor;->cacheLock:Ljava/nio/channels/FileLock; .line 131 invoke-virtual {v0}, Ljava/nio/channels/FileLock;->isValid()Z move-result v0 if-eqz v0, :cond_2 if-nez p3, :cond_0 iget-object v0, p0, Landroidx/multidex/MultiDexExtractor;->sourceApk:Ljava/io/File; iget-wide v2, p0, Landroidx/multidex/MultiDexExtractor;->sourceCrc:J .line 136 invoke-static {p1, v0, v2, v3, p2}, Landroidx/multidex/MultiDexExtractor;->isModified(Landroid/content/Context;Ljava/io/File;JLjava/lang/String;)Z move-result v0 if-nez v0, :cond_0 .line 138 :try_start_0 invoke-direct {p0, p1, p2}, Landroidx/multidex/MultiDexExtractor;->loadExistingExtractions(Landroid/content/Context;Ljava/lang/String;)Ljava/util/List; move-result-object p0 :try_end_0 .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_2 :catch_0 move-exception p3 const-string v0, "Failed to reload existing extracted secondary dex files, falling back to fresh extraction" .line 140 invoke-static {v1, v0, p3}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I .line 142 invoke-direct {p0}, Landroidx/multidex/MultiDexExtractor;->performExtractions()Ljava/util/List; move-result-object p3 iget-object v0, p0, Landroidx/multidex/MultiDexExtractor;->sourceApk:Ljava/io/File; .line 143 invoke-static {v0}, Landroidx/multidex/MultiDexExtractor;->getTimeStamp(Ljava/io/File;)J move-result-wide v4 iget-wide v6, p0, Landroidx/multidex/MultiDexExtractor;->sourceCrc:J move-object v2, p1 move-object v3, p2 move-object v8, p3 invoke-static/range {v2 .. v8}, Landroidx/multidex/MultiDexExtractor;->putStoredApkInfo(Landroid/content/Context;Ljava/lang/String;JJLjava/util/List;)V goto :goto_1 :cond_0 if-eqz p3, :cond_1 const-string p3, "Forced extraction must be performed." .line 148 invoke-static {v1, p3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I goto :goto_0 :cond_1 const-string p3, "Detected that extraction must be performed." .line 150 invoke-static {v1, p3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I .line 152 :goto_0 invoke-direct {p0}, Landroidx/multidex/MultiDexExtractor;->performExtractions()Ljava/util/List; move-result-object p3 iget-object v0, p0, Landroidx/multidex/MultiDexExtractor;->sourceApk:Ljava/io/File; .line 153 invoke-static {v0}, Landroidx/multidex/MultiDexExtractor;->getTimeStamp(Ljava/io/File;)J move-result-wide v4 iget-wide v6, p0, Landroidx/multidex/MultiDexExtractor;->sourceCrc:J move-object v2, p1 move-object v3, p2 move-object v8, p3 invoke-static/range {v2 .. v8}, Landroidx/multidex/MultiDexExtractor;->putStoredApkInfo(Landroid/content/Context;Ljava/lang/String;JJLjava/util/List;)V :goto_1 move-object p0, p3 .line 157 :goto_2 new-instance p1, Ljava/lang/StringBuilder; const-string p2, "load found " invoke-direct {p1, p2}, Ljava/lang/StringBuilder;->(Ljava/lang/String;)V invoke-interface {p0}, Ljava/util/List;->size()I move-result p2 invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object p1 const-string p2, " secondary dex files" invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object p1 invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 invoke-static {v1, p1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I return-object p0 .line 132 :cond_2 new-instance p0, Ljava/lang/IllegalStateException; const-string p1, "MultiDexExtractor was closed" invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw p0 .end method