- 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
448 lines
11 KiB
Smali
448 lines
11 KiB
Smali
.class public Landroidx/core/app/AppLocalesStorageHelper;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP_PREFIX:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field static final APPLICATION_LOCALES_RECORD_FILE:Ljava/lang/String; = "androidx.appcompat.app.AppCompatDelegate.application_locales_record_file"
|
|
|
|
.field static final DEBUG:Z = false
|
|
|
|
.field static final LOCALE_RECORD_ATTRIBUTE_TAG:Ljava/lang/String; = "application_locales"
|
|
|
|
.field static final LOCALE_RECORD_FILE_TAG:Ljava/lang/String; = "locales"
|
|
|
|
.field static final TAG:Ljava/lang/String; = "AppLocalesStorageHelper"
|
|
|
|
.field private static final sAppLocaleStorageSync:Ljava/lang/Object;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 50
|
|
new-instance v0, Ljava/lang/Object;
|
|
|
|
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
|
|
|
|
sput-object v0, Landroidx/core/app/AppLocalesStorageHelper;->sAppLocaleStorageSync:Ljava/lang/Object;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 52
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static persistLocales(Landroid/content/Context;Ljava/lang/String;)V
|
|
.locals 5
|
|
.param p0 # Landroid/content/Context;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p1 # Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
sget-object v0, Landroidx/core/app/AppLocalesStorageHelper;->sAppLocaleStorageSync:Ljava/lang/Object;
|
|
|
|
.line 122
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
const-string v1, ""
|
|
|
|
.line 123
|
|
invoke-virtual {p1, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const-string p1, "androidx.appcompat.app.AppCompatDelegate.application_locales_record_file"
|
|
|
|
.line 124
|
|
invoke-virtual {p0, p1}, Landroid/content/Context;->deleteFile(Ljava/lang/String;)Z
|
|
|
|
.line 125
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
goto :goto_3
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:try_start_1
|
|
const-string v2, "androidx.appcompat.app.AppCompatDelegate.application_locales_record_file"
|
|
|
|
.line 130
|
|
invoke-virtual {p0, v2, v1}, Landroid/content/Context;->openFileOutput(Ljava/lang/String;I)Ljava/io/FileOutputStream;
|
|
|
|
move-result-object p0
|
|
:try_end_1
|
|
.catch Ljava/io/FileNotFoundException; {:try_start_1 .. :try_end_1} :catch_3
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
.line 136
|
|
:try_start_2
|
|
invoke-static {}, Landroid/util/Xml;->newSerializer()Lorg/xmlpull/v1/XmlSerializer;
|
|
|
|
move-result-object v1
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 138
|
|
:try_start_3
|
|
invoke-interface {v1, p0, v2}, Lorg/xmlpull/v1/XmlSerializer;->setOutput(Ljava/io/OutputStream;Ljava/lang/String;)V
|
|
|
|
const-string v3, "UTF-8"
|
|
|
|
sget-object v4, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
|
|
|
|
.line 139
|
|
invoke-interface {v1, v3, v4}, Lorg/xmlpull/v1/XmlSerializer;->startDocument(Ljava/lang/String;Ljava/lang/Boolean;)V
|
|
|
|
const-string v3, "locales"
|
|
|
|
.line 140
|
|
invoke-interface {v1, v2, v3}, Lorg/xmlpull/v1/XmlSerializer;->startTag(Ljava/lang/String;Ljava/lang/String;)Lorg/xmlpull/v1/XmlSerializer;
|
|
|
|
const-string v3, "application_locales"
|
|
|
|
.line 141
|
|
invoke-interface {v1, v2, v3, p1}, Lorg/xmlpull/v1/XmlSerializer;->attribute(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/xmlpull/v1/XmlSerializer;
|
|
|
|
const-string p1, "locales"
|
|
|
|
.line 142
|
|
invoke-interface {v1, v2, p1}, Lorg/xmlpull/v1/XmlSerializer;->endTag(Ljava/lang/String;Ljava/lang/String;)Lorg/xmlpull/v1/XmlSerializer;
|
|
|
|
.line 143
|
|
invoke-interface {v1}, Lorg/xmlpull/v1/XmlSerializer;->endDocument()V
|
|
:try_end_3
|
|
.catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_0
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
.line 154
|
|
:goto_0
|
|
:try_start_4
|
|
invoke-virtual {p0}, Ljava/io/FileOutputStream;->close()V
|
|
:try_end_4
|
|
.catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_1
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_0
|
|
|
|
goto :goto_1
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
goto :goto_2
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
:try_start_5
|
|
const-string v1, "AppLocalesStorageHelper"
|
|
|
|
const-string v2, "Storing App Locales : Failed to persist app-locales in storage "
|
|
|
|
.line 149
|
|
invoke-static {v1, v2, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
:try_end_5
|
|
.catchall {:try_start_5 .. :try_end_5} :catchall_1
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
.line 160
|
|
:catch_1
|
|
:cond_1
|
|
:goto_1
|
|
:try_start_6
|
|
monitor-exit v0
|
|
:try_end_6
|
|
.catchall {:try_start_6 .. :try_end_6} :catchall_0
|
|
|
|
return-void
|
|
|
|
:goto_2
|
|
if-eqz p0, :cond_2
|
|
|
|
.line 154
|
|
:try_start_7
|
|
invoke-virtual {p0}, Ljava/io/FileOutputStream;->close()V
|
|
:try_end_7
|
|
.catch Ljava/io/IOException; {:try_start_7 .. :try_end_7} :catch_2
|
|
.catchall {:try_start_7 .. :try_end_7} :catchall_0
|
|
|
|
.line 159
|
|
:catch_2
|
|
:cond_2
|
|
:try_start_8
|
|
throw p1
|
|
|
|
:catch_3
|
|
const-string p0, "AppLocalesStorageHelper"
|
|
|
|
const-string p1, "Storing App Locales : FileNotFoundException: Cannot open file %s for writing "
|
|
|
|
const/4 v2, 0x1
|
|
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
const-string v3, "androidx.appcompat.app.AppCompatDelegate.application_locales_record_file"
|
|
|
|
aput-object v3, v2, v1
|
|
|
|
.line 132
|
|
invoke-static {p1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p0, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
.line 134
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
.line 160
|
|
:goto_3
|
|
monitor-exit v0
|
|
:try_end_8
|
|
.catchall {:try_start_8 .. :try_end_8} :catchall_0
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static readLocales(Landroid/content/Context;)Ljava/lang/String;
|
|
.locals 8
|
|
.param p0 # Landroid/content/Context;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
sget-object v0, Landroidx/core/app/AppLocalesStorageHelper;->sAppLocaleStorageSync:Ljava/lang/Object;
|
|
|
|
.line 59
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
const-string v1, ""
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
:try_start_1
|
|
const-string v2, "androidx.appcompat.app.AppCompatDelegate.application_locales_record_file"
|
|
|
|
.line 64
|
|
invoke-virtual {p0, v2}, Landroid/content/Context;->openFileInput(Ljava/lang/String;)Ljava/io/FileInputStream;
|
|
|
|
move-result-object v2
|
|
:try_end_1
|
|
.catch Ljava/io/FileNotFoundException; {:try_start_1 .. :try_end_1} :catch_3
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
.line 73
|
|
:try_start_2
|
|
invoke-static {}, Landroid/util/Xml;->newPullParser()Lorg/xmlpull/v1/XmlPullParser;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "UTF-8"
|
|
|
|
.line 74
|
|
invoke-interface {v3, v2, v4}, Lorg/xmlpull/v1/XmlPullParser;->setInput(Ljava/io/InputStream;Ljava/lang/String;)V
|
|
|
|
.line 76
|
|
invoke-interface {v3}, Lorg/xmlpull/v1/XmlPullParser;->getDepth()I
|
|
|
|
move-result v4
|
|
|
|
.line 77
|
|
:cond_0
|
|
:goto_0
|
|
invoke-interface {v3}, Lorg/xmlpull/v1/XmlPullParser;->next()I
|
|
|
|
move-result v5
|
|
|
|
const/4 v6, 0x1
|
|
|
|
if-eq v5, v6, :cond_3
|
|
|
|
const/4 v6, 0x3
|
|
|
|
if-ne v5, v6, :cond_1
|
|
|
|
.line 78
|
|
invoke-interface {v3}, Lorg/xmlpull/v1/XmlPullParser;->getDepth()I
|
|
|
|
move-result v7
|
|
|
|
if-le v7, v4, :cond_3
|
|
|
|
goto :goto_1
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
goto :goto_5
|
|
|
|
:cond_1
|
|
:goto_1
|
|
if-eq v5, v6, :cond_0
|
|
|
|
const/4 v6, 0x4
|
|
|
|
if-ne v5, v6, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
.line 83
|
|
:cond_2
|
|
invoke-interface {v3}, Lorg/xmlpull/v1/XmlPullParser;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
const-string v6, "locales"
|
|
|
|
.line 84
|
|
invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_0
|
|
|
|
const-string v4, "application_locales"
|
|
|
|
const/4 v5, 0x0
|
|
|
|
.line 85
|
|
invoke-interface {v3, v5, v4}, Lorg/xmlpull/v1/XmlPullParser;->getAttributeValue(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
:try_end_2
|
|
.catch Lorg/xmlpull/v1/XmlPullParserException; {:try_start_2 .. :try_end_2} :catch_0
|
|
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
:cond_3
|
|
if-eqz v2, :cond_4
|
|
|
|
.line 97
|
|
:goto_2
|
|
:try_start_3
|
|
invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
|
|
:try_end_3
|
|
.catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_1
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1
|
|
|
|
goto :goto_3
|
|
|
|
:catchall_1
|
|
move-exception p0
|
|
|
|
goto :goto_6
|
|
|
|
:catch_0
|
|
:try_start_4
|
|
const-string v3, "AppLocalesStorageHelper"
|
|
|
|
const-string v4, "Reading app Locales : Unable to parse through file :androidx.appcompat.app.AppCompatDelegate.application_locales_record_file"
|
|
|
|
.line 91
|
|
invoke-static {v3, v4}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_0
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
goto :goto_2
|
|
|
|
.line 104
|
|
:catch_1
|
|
:cond_4
|
|
:goto_3
|
|
:try_start_5
|
|
invoke-virtual {v1}, Ljava/lang/String;->isEmpty()Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_5
|
|
|
|
goto :goto_4
|
|
|
|
:cond_5
|
|
const-string v2, "androidx.appcompat.app.AppCompatDelegate.application_locales_record_file"
|
|
|
|
.line 112
|
|
invoke-virtual {p0, v2}, Landroid/content/Context;->deleteFile(Ljava/lang/String;)Z
|
|
|
|
.line 114
|
|
:goto_4
|
|
monitor-exit v0
|
|
:try_end_5
|
|
.catchall {:try_start_5 .. :try_end_5} :catchall_1
|
|
|
|
return-object v1
|
|
|
|
:goto_5
|
|
if-eqz v2, :cond_6
|
|
|
|
.line 97
|
|
:try_start_6
|
|
invoke-virtual {v2}, Ljava/io/FileInputStream;->close()V
|
|
:try_end_6
|
|
.catch Ljava/io/IOException; {:try_start_6 .. :try_end_6} :catch_2
|
|
.catchall {:try_start_6 .. :try_end_6} :catchall_1
|
|
|
|
.line 102
|
|
:catch_2
|
|
:cond_6
|
|
:try_start_7
|
|
throw p0
|
|
|
|
.line 70
|
|
:catch_3
|
|
monitor-exit v0
|
|
|
|
return-object v1
|
|
|
|
.line 115
|
|
:goto_6
|
|
monitor-exit v0
|
|
:try_end_7
|
|
.catchall {:try_start_7 .. :try_end_7} :catchall_1
|
|
|
|
throw p0
|
|
.end method
|