303 lines
7.6 KiB
Smali
303 lines
7.6 KiB
Smali
.class public Lf/g/m/j;
|
|
.super Ljava/lang/Object;
|
|
.source "NativeLoaderToSoLoaderDelegate.java"
|
|
|
|
# interfaces
|
|
.implements Lf/g/m/o/b;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Ljava/lang/String;I)Z
|
|
.locals 9
|
|
|
|
const/4 v0, 0x1
|
|
|
|
and-int/2addr p2, v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
const/16 p2, 0x10
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p2, 0x0
|
|
|
|
:goto_0
|
|
or-int/2addr p2, v1
|
|
|
|
sget-object v2, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v2}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->lock()V
|
|
|
|
:try_start_0
|
|
sget-object v2, Lcom/facebook/soloader/SoLoader;->d:[Lf/g/m/l;
|
|
|
|
if-nez v2, :cond_4
|
|
|
|
const-string v2, "http://www.android.com/"
|
|
|
|
const-string v3, "java.vendor.url"
|
|
|
|
invoke-static {v3}, Ljava/lang/System;->getProperty(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-static {}, Lcom/facebook/soloader/SoLoader;->a()V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_1
|
|
const-class p2, Lcom/facebook/soloader/SoLoader;
|
|
|
|
monitor-enter p2
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_2
|
|
|
|
:try_start_1
|
|
sget-object v1, Lcom/facebook/soloader/SoLoader;->h:Ljava/util/HashSet;
|
|
|
|
invoke-virtual {v1, p1}, Ljava/util/HashSet;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
xor-int/2addr v0, v1
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
sget-object v1, Lcom/facebook/soloader/SoLoader;->k:Lf/g/m/m;
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
sget-object v1, Lcom/facebook/soloader/SoLoader;->k:Lf/g/m/m;
|
|
|
|
invoke-interface {v1, p1}, Lf/g/m/m;->a(Ljava/lang/String;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
invoke-static {p1}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
|
|
|
|
:cond_3
|
|
:goto_1
|
|
monitor-exit p2
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
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
|
|
|
|
goto/16 :goto_5
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
:try_start_2
|
|
monitor-exit p2
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
:try_start_3
|
|
throw p1
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_2
|
|
|
|
:cond_4
|
|
:goto_2
|
|
sget-object v2, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v2}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->unlock()V
|
|
|
|
sget-boolean v2, Lcom/facebook/soloader/SoLoader;->m:Z
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
sget-object v2, Lcom/facebook/soloader/SoLoader;->k:Lf/g/m/m;
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
invoke-interface {v2, p1}, Lf/g/m/m;->a(Ljava/lang/String;)V
|
|
|
|
goto :goto_5
|
|
|
|
:cond_5
|
|
invoke-static {p1}, Ljava/lang/System;->mapLibraryName(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:cond_6
|
|
const/4 v4, 0x0
|
|
|
|
:try_start_4
|
|
invoke-static {v2, p1, v4, p2, v4}, Lcom/facebook/soloader/SoLoader;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILandroid/os/StrictMode$ThreadPolicy;)Z
|
|
|
|
move-result v3
|
|
:try_end_4
|
|
.catch Ljava/lang/UnsatisfiedLinkError; {:try_start_4 .. :try_end_4} :catch_0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
goto :goto_4
|
|
|
|
:catch_0
|
|
move-exception v4
|
|
|
|
sget v5, Lcom/facebook/soloader/SoLoader;->e:I
|
|
|
|
sget-object v6, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v6}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->writeLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;->lock()V
|
|
|
|
:try_start_5
|
|
sget-object v6, Lcom/facebook/soloader/SoLoader;->g:Lf/g/m/b;
|
|
|
|
if-eqz v6, :cond_7
|
|
|
|
sget-object v6, Lcom/facebook/soloader/SoLoader;->g:Lf/g/m/b;
|
|
|
|
invoke-virtual {v6}, Lf/g/m/b;->c()Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_7
|
|
|
|
const-string v6, "SoLoader"
|
|
|
|
new-instance v7, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v8, "sApplicationSoSource updated during load: "
|
|
|
|
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v7, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v8, ", attempting load again."
|
|
|
|
invoke-virtual {v7, v8}, 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 {v6, v7}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
sget v6, Lcom/facebook/soloader/SoLoader;->e:I
|
|
|
|
add-int/2addr v6, v0
|
|
|
|
sput v6, Lcom/facebook/soloader/SoLoader;->e:I
|
|
:try_end_5
|
|
.catch Ljava/io/IOException; {:try_start_5 .. :try_end_5} :catch_1
|
|
.catchall {:try_start_5 .. :try_end_5} :catchall_1
|
|
|
|
const/4 v6, 0x1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_7
|
|
const/4 v6, 0x0
|
|
|
|
:goto_3
|
|
sget-object v7, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {v7}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->writeLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v7}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;->unlock()V
|
|
|
|
sget v7, Lcom/facebook/soloader/SoLoader;->e:I
|
|
|
|
if-eq v7, v5, :cond_8
|
|
|
|
:goto_4
|
|
if-nez v6, :cond_6
|
|
|
|
move v0, v3
|
|
|
|
:goto_5
|
|
return v0
|
|
|
|
:cond_8
|
|
throw v4
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
goto :goto_6
|
|
|
|
:catch_1
|
|
move-exception p1
|
|
|
|
:try_start_6
|
|
new-instance p2, Ljava/lang/RuntimeException;
|
|
|
|
invoke-direct {p2, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
throw p2
|
|
:try_end_6
|
|
.catchall {:try_start_6 .. :try_end_6} :catchall_1
|
|
|
|
:goto_6
|
|
sget-object p2, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {p2}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->writeLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;->unlock()V
|
|
|
|
throw p1
|
|
|
|
:catchall_2
|
|
move-exception p1
|
|
|
|
sget-object p2, Lcom/facebook/soloader/SoLoader;->c:Ljava/util/concurrent/locks/ReentrantReadWriteLock;
|
|
|
|
invoke-virtual {p2}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->unlock()V
|
|
|
|
throw p1
|
|
.end method
|