- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
440 lines
12 KiB
Smali
440 lines
12 KiB
Smali
.class public Landroidx/webkit/ProcessGlobalConfig;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# static fields
|
|
.field private static sApplyCalled:Z
|
|
.annotation build Landroidx/annotation/GuardedBy;
|
|
value = "sLock"
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private static final sLock:Ljava/lang/Object;
|
|
|
|
.field private static final sProcessGlobalConfig:Ljava/util/concurrent/atomic/AtomicReference;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/Object;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# instance fields
|
|
.field mCacheDirectoryBasePath:Ljava/lang/String;
|
|
|
|
.field mDataDirectoryBasePath:Ljava/lang/String;
|
|
|
|
.field mDataDirectorySuffix:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 63
|
|
new-instance v0, Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
invoke-direct {v0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
|
|
|
|
sput-object v0, Landroidx/webkit/ProcessGlobalConfig;->sProcessGlobalConfig:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
.line 65
|
|
new-instance v0, Ljava/lang/Object;
|
|
|
|
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
|
|
|
|
sput-object v0, Landroidx/webkit/ProcessGlobalConfig;->sLock:Ljava/lang/Object;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
sput-boolean v0, Landroidx/webkit/ProcessGlobalConfig;->sApplyCalled:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 75
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static apply(Landroidx/webkit/ProcessGlobalConfig;)V
|
|
.locals 3
|
|
.param p0 # Landroidx/webkit/ProcessGlobalConfig;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
sget-object v0, Landroidx/webkit/ProcessGlobalConfig;->sLock:Ljava/lang/Object;
|
|
|
|
.line 213
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
sget-boolean v1, Landroidx/webkit/ProcessGlobalConfig;->sApplyCalled:Z
|
|
|
|
if-nez v1, :cond_6
|
|
|
|
const/4 v1, 0x1
|
|
|
|
sput-boolean v1, Landroidx/webkit/ProcessGlobalConfig;->sApplyCalled:Z
|
|
|
|
.line 225
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 226
|
|
new-instance v0, Ljava/util/HashMap;
|
|
|
|
invoke-direct {v0}, Ljava/util/HashMap;-><init>()V
|
|
|
|
.line 227
|
|
invoke-static {}, Landroidx/webkit/ProcessGlobalConfig;->webViewCurrentlyLoaded()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_5
|
|
|
|
.line 233
|
|
iget-object v1, p0, Landroidx/webkit/ProcessGlobalConfig;->mDataDirectorySuffix:Ljava/lang/String;
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
.line 234
|
|
sget-object v1, Landroidx/webkit/internal/WebViewFeatureInternal;->STARTUP_FEATURE_SET_DATA_DIRECTORY_SUFFIX:Landroidx/webkit/internal/StartupApiFeature$P;
|
|
|
|
.line 236
|
|
invoke-virtual {v1}, Landroidx/webkit/internal/StartupApiFeature$P;->isSupportedByFramework()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 237
|
|
iget-object v1, p0, Landroidx/webkit/ProcessGlobalConfig;->mDataDirectorySuffix:Ljava/lang/String;
|
|
|
|
invoke-static {v1}, Landroidx/webkit/internal/ApiHelperForP;->setDataDirectorySuffix(Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v1, "DATA_DIRECTORY_SUFFIX"
|
|
|
|
.line 239
|
|
iget-object v2, p0, Landroidx/webkit/ProcessGlobalConfig;->mDataDirectorySuffix:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 243
|
|
:cond_1
|
|
:goto_0
|
|
iget-object v1, p0, Landroidx/webkit/ProcessGlobalConfig;->mDataDirectoryBasePath:Ljava/lang/String;
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
const-string v2, "DATA_DIRECTORY_BASE_PATH"
|
|
|
|
.line 244
|
|
invoke-virtual {v0, v2, v1}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 247
|
|
:cond_2
|
|
iget-object p0, p0, Landroidx/webkit/ProcessGlobalConfig;->mCacheDirectoryBasePath:Ljava/lang/String;
|
|
|
|
if-eqz p0, :cond_3
|
|
|
|
const-string v1, "CACHE_DIRECTORY_BASE_PATH"
|
|
|
|
.line 248
|
|
invoke-virtual {v0, v1, p0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:cond_3
|
|
sget-object p0, Landroidx/webkit/ProcessGlobalConfig;->sProcessGlobalConfig:Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 251
|
|
invoke-static {p0, v1, v0}, Landroidx/lifecycle/LifecycleKt$$ExternalSyntheticBackportWithForwarding0;->m(Ljava/util/concurrent/atomic/AtomicReference;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_4
|
|
|
|
return-void
|
|
|
|
.line 252
|
|
:cond_4
|
|
new-instance p0, Ljava/lang/RuntimeException;
|
|
|
|
const-string v0, "Attempting to set ProcessGlobalConfig#sProcessGlobalConfig when it was already set"
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
|
|
.line 228
|
|
:cond_5
|
|
new-instance p0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v0, "WebView has already been loaded in the current process, so any attempt to apply the settings in ProcessGlobalConfig will have no effect. ProcessGlobalConfig#apply needs to be called before any calls to android.webkit APIs, such as during early app startup."
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
goto :goto_1
|
|
|
|
.line 215
|
|
:cond_6
|
|
:try_start_1
|
|
new-instance p0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v1, "ProcessGlobalConfig#apply was called more than once, which is an illegal operation. The configuration settings provided by ProcessGlobalConfig take effect only once, when WebView is first loaded into the current process. Every process should only ever create a single instance of ProcessGlobalConfig and apply it once, before any calls to android.webkit APIs, such as during early app startup."
|
|
|
|
invoke-direct {p0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
|
|
.line 225
|
|
:goto_1
|
|
monitor-exit v0
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method private static webViewCurrentlyLoaded()Z
|
|
.locals 4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:try_start_0
|
|
const-string v1, "android.webkit.WebViewFactory"
|
|
|
|
.line 262
|
|
invoke-static {v1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "sProviderInstance"
|
|
|
|
.line 264
|
|
invoke-virtual {v1, v2}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
.line 265
|
|
invoke-virtual {v1, v2}, Ljava/lang/reflect/AccessibleObject;->setAccessible(Z)V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
.line 266
|
|
invoke-virtual {v1, v3}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
move v0, v2
|
|
|
|
:catch_0
|
|
:cond_0
|
|
return v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public setDataDirectorySuffix(Landroid/content/Context;Ljava/lang/String;)Landroidx/webkit/ProcessGlobalConfig;
|
|
.locals 2
|
|
.param p1 # Landroid/content/Context;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.line 117
|
|
sget-object v0, Landroidx/webkit/internal/WebViewFeatureInternal;->STARTUP_FEATURE_SET_DATA_DIRECTORY_SUFFIX:Landroidx/webkit/internal/StartupApiFeature$P;
|
|
|
|
.line 119
|
|
invoke-virtual {v0, p1}, Landroidx/webkit/internal/StartupApiFeature;->isSupported(Landroid/content/Context;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
const-string p1, ""
|
|
|
|
.line 122
|
|
invoke-virtual {p2, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
.line 125
|
|
sget-char p1, Ljava/io/File;->separatorChar:C
|
|
|
|
invoke-virtual {p2, p1}, Ljava/lang/String;->indexOf(I)I
|
|
|
|
move-result p1
|
|
|
|
if-gez p1, :cond_0
|
|
|
|
iput-object p2, p0, Landroidx/webkit/ProcessGlobalConfig;->mDataDirectorySuffix:Ljava/lang/String;
|
|
|
|
return-object p0
|
|
|
|
.line 126
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "Suffix "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p2, " contains a path separator"
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 123
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "Suffix cannot be an empty string"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 120
|
|
:cond_2
|
|
invoke-static {}, Landroidx/webkit/internal/WebViewFeatureInternal;->getUnsupportedOperationException()Ljava/lang/UnsupportedOperationException;
|
|
|
|
move-result-object p1
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public setDirectoryBasePaths(Landroid/content/Context;Ljava/io/File;Ljava/io/File;)Landroidx/webkit/ProcessGlobalConfig;
|
|
.locals 1
|
|
.param p1 # Landroid/content/Context;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Ljava/io/File;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # Ljava/io/File;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.line 175
|
|
sget-object v0, Landroidx/webkit/internal/WebViewFeatureInternal;->STARTUP_FEATURE_SET_DIRECTORY_BASE_PATH:Landroidx/webkit/internal/StartupApiFeature$NoFramework;
|
|
|
|
.line 177
|
|
invoke-virtual {v0, p1}, Landroidx/webkit/internal/StartupApiFeature;->isSupported(Landroid/content/Context;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 180
|
|
invoke-virtual {p2}, Ljava/io/File;->isAbsolute()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 184
|
|
invoke-virtual {p3}, Ljava/io/File;->isAbsolute()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 188
|
|
invoke-virtual {p2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Landroidx/webkit/ProcessGlobalConfig;->mDataDirectoryBasePath:Ljava/lang/String;
|
|
|
|
.line 189
|
|
invoke-virtual {p3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Landroidx/webkit/ProcessGlobalConfig;->mCacheDirectoryBasePath:Ljava/lang/String;
|
|
|
|
return-object p0
|
|
|
|
.line 185
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "cacheDirectoryBasePath must be a non-empty absolute path"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 181
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "dataDirectoryBasePath must be a non-empty absolute path"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 178
|
|
:cond_2
|
|
invoke-static {}, Landroidx/webkit/internal/WebViewFeatureInternal;->getUnsupportedOperationException()Ljava/lang/UnsupportedOperationException;
|
|
|
|
move-result-object p1
|
|
|
|
throw p1
|
|
.end method
|