1913 lines
49 KiB
Smali
1913 lines
49 KiB
Smali
.class public Lcom/facebook/soloader/SoLoader;
|
|
.super Ljava/lang/Object;
|
|
.source "SoLoader.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/facebook/soloader/SoLoader$Api14Utils;,
|
|
Lcom/facebook/soloader/SoLoader$b;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final a:Z
|
|
|
|
.field public static b:Lf/j/m/k;
|
|
|
|
.field public static final c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
.field public static d:[Lf/j/m/l;
|
|
|
|
.field public static volatile e:I
|
|
|
|
.field public static f:[Lf/j/m/m;
|
|
|
|
.field public static g:Lf/j/m/b;
|
|
|
|
.field public static final h:Ljava/util/HashSet;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/HashSet<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public static final i:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/Object;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public static final j:Ljava/util/Set;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Set<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public static k:I
|
|
|
|
.field public static l:Z
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-direct {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;-><init>()V
|
|
|
|
sput-object v0, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
sput-object v0, Lcom/facebook/soloader/SoLoader;->d:[Lf/j/m/l;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
sput v0, Lcom/facebook/soloader/SoLoader;->e:I
|
|
|
|
new-instance v1, Ljava/util/HashSet;
|
|
|
|
invoke-direct {v1}, Ljava/util/HashSet;-><init>()V
|
|
|
|
sput-object v1, Lcom/facebook/soloader/SoLoader;->h:Ljava/util/HashSet;
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
sput-object v1, Lcom/facebook/soloader/SoLoader;->i:Ljava/util/Map;
|
|
|
|
new-instance v1, Ljava/util/concurrent/ConcurrentHashMap;
|
|
|
|
invoke-direct {v1}, Ljava/util/concurrent/ConcurrentHashMap;-><init>()V
|
|
|
|
invoke-static {v1}, Ljava/util/Collections;->newSetFromMap(Ljava/util/Map;)Ljava/util/Set;
|
|
|
|
move-result-object v1
|
|
|
|
sput-object v1, Lcom/facebook/soloader/SoLoader;->j:Ljava/util/Set;
|
|
|
|
:try_start_0
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
:try_end_0
|
|
.catch Ljava/lang/NoClassDefFoundError; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catch Ljava/lang/UnsatisfiedLinkError; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
:catch_0
|
|
sput-boolean v0, Lcom/facebook/soloader/SoLoader;->a:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a()V
|
|
.locals 2
|
|
|
|
sget-object v0, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->lock()V
|
|
|
|
:try_start_0
|
|
sget-object v0, Lcom/facebook/soloader/SoLoader;->d:[Lf/j/m/l;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
sget-object v0, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->unlock()V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
:try_start_1
|
|
new-instance v0, Ljava/lang/RuntimeException;
|
|
|
|
const-string v1, "SoLoader.init() not yet called"
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
sget-object v1, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v1}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->unlock()V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;I)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
invoke-static {}, Landroid/os/StrictMode;->allowThreadDiskWrites()Landroid/os/StrictMode$ThreadPolicy;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
:try_start_0
|
|
invoke-virtual {p0}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;
|
|
|
|
move-result-object v1
|
|
|
|
iget v1, v1, Landroid/content/pm/ApplicationInfo;->flags:I
|
|
|
|
and-int/lit16 v1, v1, 0x81
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
sput-boolean v1, Lcom/facebook/soloader/SoLoader;->l:Z
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-static {v1}, Lcom/facebook/soloader/SoLoader;->a(Lf/j/m/k;)V
|
|
|
|
invoke-static {p0, p1}, Lcom/facebook/soloader/SoLoader;->b(Landroid/content/Context;I)V
|
|
|
|
invoke-static {}, Ls/a/b/b/a;->e()Z
|
|
|
|
move-result p0
|
|
|
|
if-nez p0, :cond_1
|
|
|
|
new-instance p0, Lf/j/m/j;
|
|
|
|
invoke-direct {p0}, Lf/j/m/j;-><init>()V
|
|
|
|
invoke-static {p0}, Ls/a/b/b/a;->a(Lf/j/m/j;)V
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
:cond_1
|
|
invoke-static {v0}, Landroid/os/StrictMode;->setThreadPolicy(Landroid/os/StrictMode$ThreadPolicy;)V
|
|
|
|
return-void
|
|
|
|
:goto_1
|
|
invoke-static {v0}, Landroid/os/StrictMode;->setThreadPolicy(Landroid/os/StrictMode$ThreadPolicy;)V
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static declared-synchronized a(Lf/j/m/k;)V
|
|
.locals 11
|
|
|
|
const-class v0, Lcom/facebook/soloader/SoLoader;
|
|
|
|
monitor-enter v0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
:try_start_0
|
|
sput-object p0, Lcom/facebook/soloader/SoLoader;->b:Lf/j/m/k;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
:try_start_1
|
|
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-static {}, Lcom/facebook/soloader/SoLoader;->b()Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v6
|
|
|
|
const/4 p0, 0x0
|
|
|
|
if-eqz v6, :cond_1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
invoke-static {}, Lcom/facebook/soloader/SoLoader$Api14Utils;->a()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
move-object v3, v1
|
|
|
|
:goto_1
|
|
if-nez v3, :cond_3
|
|
|
|
move-object v4, v1
|
|
|
|
goto :goto_4
|
|
|
|
:cond_3
|
|
const-string v1, ":"
|
|
|
|
invoke-virtual {v3, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
new-instance v7, Ljava/util/ArrayList;
|
|
|
|
array-length v8, v4
|
|
|
|
invoke-direct {v7, v8}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
array-length v8, v4
|
|
|
|
:goto_2
|
|
if-ge p0, v8, :cond_5
|
|
|
|
aget-object v9, v4, p0
|
|
|
|
const-string v10, "!"
|
|
|
|
invoke-virtual {v9, v10}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v10
|
|
|
|
if-eqz v10, :cond_4
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
invoke-virtual {v7, v9}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
:goto_3
|
|
add-int/lit8 p0, p0, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
invoke-static {v1, v7}, Landroid/text/TextUtils;->join(Ljava/lang/CharSequence;Ljava/lang/Iterable;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
move-object v4, p0
|
|
|
|
:goto_4
|
|
new-instance p0, Lcom/facebook/soloader/SoLoader$a;
|
|
|
|
move-object v1, p0
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/facebook/soloader/SoLoader$a;-><init>(ZLjava/lang/String;Ljava/lang/String;Ljava/lang/Runtime;Ljava/lang/reflect/Method;)V
|
|
|
|
sput-object p0, Lcom/facebook/soloader/SoLoader;->b:Lf/j/m/k;
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
monitor-exit v0
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static a(Ljava/lang/String;ILandroid/os/StrictMode$ThreadPolicy;)V
|
|
.locals 12
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, " result: "
|
|
|
|
sget-object v1, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v1}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->lock()V
|
|
|
|
:try_start_0
|
|
sget-object v1, Lcom/facebook/soloader/SoLoader;->d:[Lf/j/m/l;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_3
|
|
|
|
const-string v2, "couldn\'t find DSO to load: "
|
|
|
|
const-string v3, "SoLoader"
|
|
|
|
if-eqz v1, :cond_11
|
|
|
|
sget-object v1, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v1}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->unlock()V
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
invoke-static {}, Landroid/os/StrictMode;->allowThreadDiskReads()Landroid/os/StrictMode$ThreadPolicy;
|
|
|
|
move-result-object p2
|
|
|
|
const/4 v4, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v4, 0x0
|
|
|
|
:goto_0
|
|
sget-boolean v5, Lcom/facebook/soloader/SoLoader;->a:Z
|
|
|
|
if-eqz v5, :cond_1
|
|
|
|
const-string v5, "SoLoader.loadLibrary["
|
|
|
|
const-string v6, "]"
|
|
|
|
invoke-static {v5, p0, v6}, Lcom/facebook/soloader/Api18TraceUtils;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:cond_1
|
|
const/4 v5, 0x0
|
|
|
|
:cond_2
|
|
const/4 v6, 0x3
|
|
|
|
:try_start_1
|
|
sget-object v7, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v7}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v7}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->lock()V
|
|
|
|
sget v7, Lcom/facebook/soloader/SoLoader;->e:I
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_2
|
|
|
|
const/4 v8, 0x0
|
|
|
|
:goto_1
|
|
if-nez v5, :cond_5
|
|
|
|
:try_start_2
|
|
sget-object v9, Lcom/facebook/soloader/SoLoader;->d:[Lf/j/m/l;
|
|
|
|
array-length v9, v9
|
|
|
|
if-ge v8, v9, :cond_5
|
|
|
|
sget-object v9, Lcom/facebook/soloader/SoLoader;->d:[Lf/j/m/l;
|
|
|
|
aget-object v9, v9, v8
|
|
|
|
invoke-virtual {v9, p0, p1, p2}, Lf/j/m/l;->a(Ljava/lang/String;ILandroid/os/StrictMode$ThreadPolicy;)I
|
|
|
|
move-result v5
|
|
|
|
if-ne v5, v6, :cond_4
|
|
|
|
sget-object v9, Lcom/facebook/soloader/SoLoader;->f:[Lf/j/m/m;
|
|
|
|
if-eqz v9, :cond_4
|
|
|
|
new-instance v8, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v8}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v9, "Trying backup SoSource for "
|
|
|
|
invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v8, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-static {v3, v8}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
sget-object v8, Lcom/facebook/soloader/SoLoader;->f:[Lf/j/m/m;
|
|
|
|
array-length v9, v8
|
|
|
|
const/4 v10, 0x0
|
|
|
|
:goto_2
|
|
if-ge v10, v9, :cond_5
|
|
|
|
aget-object v11, v8, v10
|
|
|
|
invoke-virtual {v11, p0}, Lf/j/m/m;->b(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v11, p0, p1, p2}, Lf/j/m/m;->a(Ljava/lang/String;ILandroid/os/StrictMode$ThreadPolicy;)I
|
|
|
|
move-result v11
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
if-ne v11, v1, :cond_3
|
|
|
|
move v5, v11
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
add-int/lit8 v10, v10, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
add-int/lit8 v8, v8, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
:try_start_3
|
|
sget-object v1, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v1}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->unlock()V
|
|
|
|
throw p1
|
|
|
|
:cond_5
|
|
:goto_3
|
|
sget-object v8, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v8}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual {v8}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->unlock()V
|
|
|
|
and-int/lit8 v8, p1, 0x2
|
|
|
|
const/4 v9, 0x2
|
|
|
|
if-ne v8, v9, :cond_8
|
|
|
|
if-nez v5, :cond_8
|
|
|
|
sget-object v8, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v8}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->writeLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual {v8}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;->lock()V
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_2
|
|
|
|
:try_start_4
|
|
sget-object v8, Lcom/facebook/soloader/SoLoader;->g:Lf/j/m/b;
|
|
|
|
if-eqz v8, :cond_6
|
|
|
|
sget-object v8, Lcom/facebook/soloader/SoLoader;->g:Lf/j/m/b;
|
|
|
|
invoke-virtual {v8}, Lf/j/m/b;->a()Z
|
|
|
|
move-result v8
|
|
|
|
if-eqz v8, :cond_6
|
|
|
|
sget v8, Lcom/facebook/soloader/SoLoader;->e:I
|
|
|
|
add-int/2addr v8, v1
|
|
|
|
sput v8, Lcom/facebook/soloader/SoLoader;->e:I
|
|
|
|
:cond_6
|
|
sget v8, Lcom/facebook/soloader/SoLoader;->e:I
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_1
|
|
|
|
if-eq v8, v7, :cond_7
|
|
|
|
const/4 v7, 0x1
|
|
|
|
goto :goto_4
|
|
|
|
:cond_7
|
|
const/4 v7, 0x0
|
|
|
|
:goto_4
|
|
:try_start_5
|
|
sget-object v8, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v8}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->writeLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual {v8}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;->unlock()V
|
|
|
|
goto :goto_5
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
sget-object v1, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v1}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->writeLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;->unlock()V
|
|
|
|
throw p1
|
|
:try_end_5
|
|
.catchall {:try_start_5 .. :try_end_5} :catchall_2
|
|
|
|
:cond_8
|
|
const/4 v7, 0x0
|
|
|
|
:goto_5
|
|
if-nez v7, :cond_2
|
|
|
|
sget-boolean p1, Lcom/facebook/soloader/SoLoader;->a:Z
|
|
|
|
if-eqz p1, :cond_9
|
|
|
|
invoke-static {}, Landroid/os/Trace;->endSection()V
|
|
|
|
:cond_9
|
|
if-eqz v4, :cond_a
|
|
|
|
invoke-static {p2}, Landroid/os/StrictMode;->setThreadPolicy(Landroid/os/StrictMode$ThreadPolicy;)V
|
|
|
|
:cond_a
|
|
if-eqz v5, :cond_b
|
|
|
|
if-eq v5, v6, :cond_b
|
|
|
|
goto :goto_6
|
|
|
|
:cond_b
|
|
invoke-static {v2, p0}, Lf/e/b/a/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {v3, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
new-instance p1, Ljava/lang/UnsatisfiedLinkError;
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/UnsatisfiedLinkError;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:catchall_2
|
|
move-exception p1
|
|
|
|
sget-boolean v1, Lcom/facebook/soloader/SoLoader;->a:Z
|
|
|
|
if-eqz v1, :cond_c
|
|
|
|
invoke-static {}, Landroid/os/Trace;->endSection()V
|
|
|
|
:cond_c
|
|
if-eqz v4, :cond_d
|
|
|
|
invoke-static {p2}, Landroid/os/StrictMode;->setThreadPolicy(Landroid/os/StrictMode$ThreadPolicy;)V
|
|
|
|
:cond_d
|
|
if-eqz v5, :cond_f
|
|
|
|
if-ne v5, v6, :cond_e
|
|
|
|
goto :goto_7
|
|
|
|
:cond_e
|
|
:goto_6
|
|
return-void
|
|
|
|
:cond_f
|
|
:goto_7
|
|
invoke-static {v2, p0}, Lf/e/b/a/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
if-nez p2, :cond_10
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Throwable;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
:cond_10
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p0, " caused by: "
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Throwable;->printStackTrace()V
|
|
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {v3, p0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
new-instance p1, Ljava/lang/UnsatisfiedLinkError;
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/UnsatisfiedLinkError;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_11
|
|
:try_start_6
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string p2, "Could not load: "
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p2, " because no SO source exists"
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {v3, p1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
new-instance p1, Ljava/lang/UnsatisfiedLinkError;
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {p2, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/UnsatisfiedLinkError;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
:try_end_6
|
|
.catchall {:try_start_6 .. :try_end_6} :catchall_3
|
|
|
|
:catchall_3
|
|
move-exception p0
|
|
|
|
sget-object p1, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {p1}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->unlock()V
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static a(Ljava/lang/String;)Z
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-static {p0, v0}, Lcom/facebook/soloader/SoLoader;->a(Ljava/lang/String;I)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static a(Ljava/lang/String;I)Z
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/lang/UnsatisfiedLinkError;
|
|
}
|
|
.end annotation
|
|
|
|
sget-object v0, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->lock()V
|
|
|
|
:try_start_0
|
|
sget-object v0, Lcom/facebook/soloader/SoLoader;->d:[Lf/j/m/l;
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
const-string v0, "http://www.android.com/"
|
|
|
|
const-string v1, "java.vendor.url"
|
|
|
|
invoke-static {v1}, Ljava/lang/System;->getProperty(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {}, Lcom/facebook/soloader/SoLoader;->a()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-class p1, Lcom/facebook/soloader/SoLoader;
|
|
|
|
monitor-enter p1
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
:try_start_1
|
|
sget-object v0, Lcom/facebook/soloader/SoLoader;->h:Ljava/util/HashSet;
|
|
|
|
invoke-virtual {v0, p0}, Ljava/util/HashSet;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
xor-int/lit8 v0, v0, 0x1
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-static {p0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
|
|
|
|
:cond_1
|
|
monitor-exit p1
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
sget-object p0, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {p0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->unlock()V
|
|
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
:try_start_2
|
|
monitor-exit p1
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
:try_start_3
|
|
throw p0
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1
|
|
|
|
:cond_2
|
|
:goto_0
|
|
sget-object v0, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->unlock()V
|
|
|
|
sget-boolean v0, Lcom/facebook/soloader/SoLoader;->l:Z
|
|
|
|
invoke-static {p0}, Ljava/lang/System;->mapLibraryName(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
or-int/lit8 p1, p1, 0x2
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-static {v0, p0, v1, p1, v1}, Lcom/facebook/soloader/SoLoader;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILandroid/os/StrictMode$ThreadPolicy;)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
|
|
:catchall_1
|
|
move-exception p0
|
|
|
|
sget-object p1, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {p1}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->unlock()V
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILandroid/os/StrictMode$ThreadPolicy;)Z
|
|
.locals 8
|
|
|
|
const-class v0, Lcom/facebook/soloader/SoLoader;
|
|
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
sget-object v1, Lcom/facebook/soloader/SoLoader;->j:Ljava/util/Set;
|
|
|
|
invoke-interface {v1, p1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
return v2
|
|
|
|
:cond_0
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
sget-object v1, Lcom/facebook/soloader/SoLoader;->h:Ljava/util/HashSet;
|
|
|
|
invoke-virtual {v1, p0}, Ljava/util/HashSet;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
if-nez p2, :cond_1
|
|
|
|
monitor-exit v0
|
|
|
|
return v2
|
|
|
|
:cond_1
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
sget-object v4, Lcom/facebook/soloader/SoLoader;->i:Ljava/util/Map;
|
|
|
|
invoke-interface {v4, p0}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
sget-object v4, Lcom/facebook/soloader/SoLoader;->i:Ljava/util/Map;
|
|
|
|
invoke-interface {v4, p0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
new-instance v4, Ljava/lang/Object;
|
|
|
|
invoke-direct {v4}, Ljava/lang/Object;-><init>()V
|
|
|
|
sget-object v5, Lcom/facebook/soloader/SoLoader;->i:Ljava/util/Map;
|
|
|
|
invoke-interface {v5, p0, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:goto_1
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_4
|
|
|
|
monitor-enter v4
|
|
|
|
if-nez v1, :cond_7
|
|
|
|
:try_start_1
|
|
monitor-enter v0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_3
|
|
|
|
:try_start_2
|
|
sget-object v5, Lcom/facebook/soloader/SoLoader;->h:Ljava/util/HashSet;
|
|
|
|
invoke-virtual {v5, p0}, Ljava/util/HashSet;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_5
|
|
|
|
if-nez p2, :cond_4
|
|
|
|
monitor-exit v0
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_1
|
|
|
|
:try_start_3
|
|
monitor-exit v4
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_3
|
|
|
|
return v2
|
|
|
|
:cond_4
|
|
const/4 v1, 0x1
|
|
|
|
:cond_5
|
|
:try_start_4
|
|
monitor-exit v0
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_1
|
|
|
|
if-nez v1, :cond_7
|
|
|
|
:try_start_5
|
|
const-string v5, "SoLoader"
|
|
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v7, "About to load: "
|
|
|
|
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-static {v5, v6}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
invoke-static {p0, p3, p4}, Lcom/facebook/soloader/SoLoader;->a(Ljava/lang/String;ILandroid/os/StrictMode$ThreadPolicy;)V
|
|
:try_end_5
|
|
.catch Ljava/io/IOException; {:try_start_5 .. :try_end_5} :catch_1
|
|
.catch Ljava/lang/UnsatisfiedLinkError; {:try_start_5 .. :try_end_5} :catch_0
|
|
.catchall {:try_start_5 .. :try_end_5} :catchall_3
|
|
|
|
:try_start_6
|
|
monitor-enter v0
|
|
:try_end_6
|
|
.catchall {:try_start_6 .. :try_end_6} :catchall_3
|
|
|
|
:try_start_7
|
|
const-string p4, "SoLoader"
|
|
|
|
new-instance v5, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v6, "Loaded: "
|
|
|
|
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v5, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-static {p4, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
sget-object p4, Lcom/facebook/soloader/SoLoader;->h:Ljava/util/HashSet;
|
|
|
|
invoke-virtual {p4, p0}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
|
|
|
|
monitor-exit v0
|
|
|
|
goto :goto_2
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
monitor-exit v0
|
|
:try_end_7
|
|
.catchall {:try_start_7 .. :try_end_7} :catchall_0
|
|
|
|
:try_start_8
|
|
throw p0
|
|
|
|
:catch_0
|
|
move-exception p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/UnsatisfiedLinkError;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
const-string p2, "unexpected e_machine:"
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_6
|
|
|
|
const-string p2, "unexpected e_machine:"
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/String;->lastIndexOf(Ljava/lang/String;)I
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p1, p2}, Ljava/lang/String;->substring(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance p2, Lcom/facebook/soloader/SoLoader$b;
|
|
|
|
invoke-direct {p2, p0, p1}, Lcom/facebook/soloader/SoLoader$b;-><init>(Ljava/lang/Throwable;Ljava/lang/String;)V
|
|
|
|
throw p2
|
|
|
|
:cond_6
|
|
throw p0
|
|
|
|
:catch_1
|
|
move-exception p0
|
|
|
|
new-instance p1, Ljava/lang/RuntimeException;
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
throw p1
|
|
:try_end_8
|
|
.catchall {:try_start_8 .. :try_end_8} :catchall_3
|
|
|
|
:catchall_1
|
|
move-exception p0
|
|
|
|
:try_start_9
|
|
monitor-exit v0
|
|
:try_end_9
|
|
.catchall {:try_start_9 .. :try_end_9} :catchall_1
|
|
|
|
:try_start_a
|
|
throw p0
|
|
|
|
:cond_7
|
|
:goto_2
|
|
and-int/lit8 p3, p3, 0x10
|
|
|
|
if-nez p3, :cond_b
|
|
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result p3
|
|
|
|
if-nez p3, :cond_8
|
|
|
|
sget-object p3, Lcom/facebook/soloader/SoLoader;->j:Ljava/util/Set;
|
|
|
|
invoke-interface {p3, p1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result p3
|
|
|
|
if-eqz p3, :cond_8
|
|
|
|
const/4 v2, 0x1
|
|
|
|
:cond_8
|
|
if-eqz p2, :cond_b
|
|
|
|
if-nez v2, :cond_b
|
|
|
|
sget-boolean p2, Lcom/facebook/soloader/SoLoader;->a:Z
|
|
|
|
if-eqz p2, :cond_9
|
|
|
|
const-string p2, "MergedSoMapping.invokeJniOnload["
|
|
|
|
const-string p3, "]"
|
|
|
|
invoke-static {p2, p1, p3}, Lcom/facebook/soloader/Api18TraceUtils;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
|
:try_end_a
|
|
.catchall {:try_start_a .. :try_end_a} :catchall_3
|
|
|
|
:cond_9
|
|
:try_start_b
|
|
const-string p2, "SoLoader"
|
|
|
|
new-instance p3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string p4, "About to merge: "
|
|
|
|
invoke-virtual {p3, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p4, " / "
|
|
|
|
invoke-virtual {p3, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p2, p0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string p3, "Unknown library: "
|
|
|
|
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
:try_end_b
|
|
.catchall {:try_start_b .. :try_end_b} :catchall_2
|
|
|
|
:catchall_2
|
|
move-exception p0
|
|
|
|
:try_start_c
|
|
sget-boolean p1, Lcom/facebook/soloader/SoLoader;->a:Z
|
|
|
|
if-eqz p1, :cond_a
|
|
|
|
invoke-static {}, Landroid/os/Trace;->endSection()V
|
|
|
|
:cond_a
|
|
throw p0
|
|
|
|
:cond_b
|
|
monitor-exit v4
|
|
|
|
xor-int/lit8 p0, v1, 0x1
|
|
|
|
return p0
|
|
|
|
:catchall_3
|
|
move-exception p0
|
|
|
|
monitor-exit v4
|
|
:try_end_c
|
|
.catchall {:try_start_c .. :try_end_c} :catchall_3
|
|
|
|
throw p0
|
|
|
|
:catchall_4
|
|
move-exception p0
|
|
|
|
:try_start_d
|
|
monitor-exit v0
|
|
:try_end_d
|
|
.catchall {:try_start_d .. :try_end_d} :catchall_4
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static b()Ljava/lang/reflect/Method;
|
|
.locals 7
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/16 v2, 0x17
|
|
|
|
if-lt v0, v2, :cond_1
|
|
|
|
const/16 v2, 0x1b
|
|
|
|
if-le v0, v2, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
:try_start_0
|
|
const-class v0, Ljava/lang/Runtime;
|
|
|
|
const-string v2, "nativeLoad"
|
|
|
|
const/4 v3, 0x3
|
|
|
|
new-array v3, v3, [Ljava/lang/Class;
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const-class v5, Ljava/lang/String;
|
|
|
|
aput-object v5, v3, v4
|
|
|
|
const-class v4, Ljava/lang/ClassLoader;
|
|
|
|
const/4 v5, 0x1
|
|
|
|
aput-object v4, v3, v5
|
|
|
|
const/4 v4, 0x2
|
|
|
|
const-class v6, Ljava/lang/String;
|
|
|
|
aput-object v6, v3, v4
|
|
|
|
invoke-virtual {v0, v2, v3}, Ljava/lang/Class;->getDeclaredMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v5}, Ljava/lang/reflect/Method;->setAccessible(Z)V
|
|
:try_end_0
|
|
.catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/lang/SecurityException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object v0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_1
|
|
move-exception v0
|
|
|
|
:goto_0
|
|
const-string v2, "SoLoader"
|
|
|
|
const-string v3, "Cannot get nativeLoad method"
|
|
|
|
invoke-static {v2, v3, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
:cond_1
|
|
:goto_1
|
|
return-object v1
|
|
.end method
|
|
|
|
.method public static b(Landroid/content/Context;I)V
|
|
.locals 16
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
const-string v1, "init exiting"
|
|
|
|
const-string v2, "SoLoader"
|
|
|
|
sget-object v3, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v3}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->writeLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;->lock()V
|
|
|
|
:try_start_0
|
|
sget-object v3, Lcom/facebook/soloader/SoLoader;->d:[Lf/j/m/l;
|
|
|
|
if-nez v3, :cond_9
|
|
|
|
const-string v3, "init start"
|
|
|
|
invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
sput p1, Lcom/facebook/soloader/SoLoader;->k:I
|
|
|
|
new-instance v3, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
const-string v4, "LD_LIBRARY_PATH"
|
|
|
|
invoke-static {v4}, Ljava/lang/System;->getenv(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
const-string v4, "/vendor/lib:/system/lib"
|
|
|
|
:cond_0
|
|
const-string v5, ":"
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
:goto_0
|
|
array-length v7, v4
|
|
|
|
const/4 v8, 0x2
|
|
|
|
if-ge v6, v7, :cond_1
|
|
|
|
new-instance v7, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v9, "adding system library source: "
|
|
|
|
invoke-virtual {v7, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
aget-object v9, v4, v6
|
|
|
|
invoke-virtual {v7, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-static {v2, v7}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
new-instance v7, Ljava/io/File;
|
|
|
|
aget-object v9, v4, v6
|
|
|
|
invoke-direct {v7, v9}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
|
|
|
new-instance v9, Lf/j/m/c;
|
|
|
|
invoke-direct {v9, v7, v8}, Lf/j/m/c;-><init>(Ljava/io/File;I)V
|
|
|
|
invoke-virtual {v3, v9}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
add-int/lit8 v6, v6, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v4, 0x1
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
and-int/lit8 v6, p1, 0x1
|
|
|
|
const-string v7, "lib-main"
|
|
|
|
const/4 v9, 0x0
|
|
|
|
if-eqz v6, :cond_2
|
|
|
|
:try_start_1
|
|
sput-object v9, Lcom/facebook/soloader/SoLoader;->f:[Lf/j/m/m;
|
|
|
|
const-string v6, "adding exo package source: lib-main"
|
|
|
|
invoke-static {v2, v6}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
new-instance v6, Lf/j/m/e;
|
|
|
|
invoke-direct {v6, v0, v7}, Lf/j/m/e;-><init>(Landroid/content/Context;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v3, v5, v6}, Ljava/util/ArrayList;->add(ILjava/lang/Object;)V
|
|
|
|
goto/16 :goto_3
|
|
|
|
:cond_2
|
|
sget-boolean v6, Lcom/facebook/soloader/SoLoader;->l:Z
|
|
|
|
if-eqz v6, :cond_3
|
|
|
|
const/4 v6, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
sget v6, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
new-instance v6, Lf/j/m/b;
|
|
|
|
invoke-direct {v6, v0, v5}, Lf/j/m/b;-><init>(Landroid/content/Context;I)V
|
|
|
|
sput-object v6, Lcom/facebook/soloader/SoLoader;->g:Lf/j/m/b;
|
|
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v10, "adding application source: "
|
|
|
|
invoke-virtual {v6, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
sget-object v10, Lcom/facebook/soloader/SoLoader;->g:Lf/j/m/b;
|
|
|
|
invoke-virtual {v10}, Lf/j/m/b;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v10
|
|
|
|
invoke-virtual {v6, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-static {v2, v6}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
sget-object v6, Lcom/facebook/soloader/SoLoader;->g:Lf/j/m/b;
|
|
|
|
invoke-virtual {v3, v5, v6}, Ljava/util/ArrayList;->add(ILjava/lang/Object;)V
|
|
|
|
const/4 v6, 0x1
|
|
|
|
:goto_1
|
|
sget v10, Lcom/facebook/soloader/SoLoader;->k:I
|
|
|
|
and-int/lit8 v10, v10, 0x8
|
|
|
|
if-eqz v10, :cond_4
|
|
|
|
sput-object v9, Lcom/facebook/soloader/SoLoader;->f:[Lf/j/m/m;
|
|
|
|
goto/16 :goto_3
|
|
|
|
:cond_4
|
|
new-instance v9, Ljava/io/File;
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;
|
|
|
|
move-result-object v10
|
|
|
|
iget-object v10, v10, Landroid/content/pm/ApplicationInfo;->sourceDir:Ljava/lang/String;
|
|
|
|
invoke-direct {v9, v10}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
|
|
|
new-instance v10, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v10}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
new-instance v11, Lf/j/m/a;
|
|
|
|
invoke-direct {v11, v0, v9, v7, v6}, Lf/j/m/a;-><init>(Landroid/content/Context;Ljava/io/File;Ljava/lang/String;I)V
|
|
|
|
invoke-virtual {v10, v11}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
new-instance v7, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v9, "adding backup source from : "
|
|
|
|
invoke-virtual {v7, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v11}, Lf/j/m/c;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v9
|
|
|
|
invoke-virtual {v7, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-static {v2, v7}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
sget v7, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;
|
|
|
|
move-result-object v7
|
|
|
|
iget-object v7, v7, Landroid/content/pm/ApplicationInfo;->splitSourceDirs:[Ljava/lang/String;
|
|
|
|
if-eqz v7, :cond_5
|
|
|
|
const-string v7, "adding backup sources from split apks"
|
|
|
|
invoke-static {v2, v7}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/content/Context;->getApplicationInfo()Landroid/content/pm/ApplicationInfo;
|
|
|
|
move-result-object v7
|
|
|
|
iget-object v7, v7, Landroid/content/pm/ApplicationInfo;->splitSourceDirs:[Ljava/lang/String;
|
|
|
|
array-length v9, v7
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
:goto_2
|
|
if-ge v11, v9, :cond_5
|
|
|
|
aget-object v13, v7, v11
|
|
|
|
new-instance v14, Lf/j/m/a;
|
|
|
|
new-instance v15, Ljava/io/File;
|
|
|
|
invoke-direct {v15, v13}, Ljava/io/File;-><init>(Ljava/lang/String;)V
|
|
|
|
new-instance v13, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v13}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v4, "lib-"
|
|
|
|
invoke-virtual {v13, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
add-int/lit8 v4, v12, 0x1
|
|
|
|
invoke-virtual {v13, v12}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v12
|
|
|
|
invoke-direct {v14, v0, v15, v12, v6}, Lf/j/m/a;-><init>(Landroid/content/Context;Ljava/io/File;Ljava/lang/String;I)V
|
|
|
|
new-instance v12, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v12}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v13, "adding backup source: "
|
|
|
|
invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v14}, Lf/j/m/c;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v13
|
|
|
|
invoke-virtual {v12, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v12}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v12
|
|
|
|
invoke-static {v2, v12}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
invoke-virtual {v10, v14}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
add-int/lit8 v11, v11, 0x1
|
|
|
|
move v12, v4
|
|
|
|
const/4 v4, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
invoke-virtual {v10}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v0
|
|
|
|
new-array v0, v0, [Lf/j/m/m;
|
|
|
|
invoke-virtual {v10, v0}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, [Lf/j/m/m;
|
|
|
|
sput-object v0, Lcom/facebook/soloader/SoLoader;->f:[Lf/j/m/m;
|
|
|
|
invoke-virtual {v3, v5, v10}, Ljava/util/ArrayList;->addAll(ILjava/util/Collection;)Z
|
|
|
|
:cond_6
|
|
:goto_3
|
|
invoke-virtual {v3}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v0
|
|
|
|
new-array v0, v0, [Lf/j/m/l;
|
|
|
|
invoke-virtual {v3, v0}, Ljava/util/ArrayList;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, [Lf/j/m/l;
|
|
|
|
sget-object v3, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v3}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->writeLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;->lock()V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
:try_start_2
|
|
sget v3, Lcom/facebook/soloader/SoLoader;->k:I
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
and-int/2addr v3, v8
|
|
|
|
if-eqz v3, :cond_7
|
|
|
|
const/4 v5, 0x1
|
|
|
|
:cond_7
|
|
:try_start_3
|
|
sget-object v3, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v3}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->writeLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;->unlock()V
|
|
|
|
array-length v3, v0
|
|
|
|
:goto_4
|
|
add-int/lit8 v4, v3, -0x1
|
|
|
|
if-lez v3, :cond_8
|
|
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v6, "Preparing SO source: "
|
|
|
|
invoke-virtual {v3, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
aget-object v6, v0, v4
|
|
|
|
invoke-virtual {v3, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
aget-object v3, v0, v4
|
|
|
|
invoke-virtual {v3, v5}, Lf/j/m/l;->a(I)V
|
|
|
|
move v3, v4
|
|
|
|
goto :goto_4
|
|
|
|
:cond_8
|
|
sput-object v0, Lcom/facebook/soloader/SoLoader;->d:[Lf/j/m/l;
|
|
|
|
sget v0, Lcom/facebook/soloader/SoLoader;->e:I
|
|
|
|
const/4 v3, 0x1
|
|
|
|
add-int/2addr v0, v3
|
|
|
|
sput v0, Lcom/facebook/soloader/SoLoader;->e:I
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "init finish: "
|
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
sget-object v3, Lcom/facebook/soloader/SoLoader;->d:[Lf/j/m/l;
|
|
|
|
array-length v3, v3
|
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string v3, " SO sources prepared"
|
|
|
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v2, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
goto :goto_5
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
move-object v3, v0
|
|
|
|
sget-object v0, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->writeLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;->unlock()V
|
|
|
|
throw v3
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1
|
|
|
|
:cond_9
|
|
:goto_5
|
|
invoke-static {v2, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
sget-object v0, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->writeLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;->unlock()V
|
|
|
|
return-void
|
|
|
|
:catchall_1
|
|
move-exception v0
|
|
|
|
invoke-static {v2, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
sget-object v1, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v1}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->writeLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;->unlock()V
|
|
|
|
throw v0
|
|
.end method
|