- 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
272 lines
6.9 KiB
Smali
272 lines
6.9 KiB
Smali
.class public final Lcom/facebook/internal/CustomTabUtils;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# static fields
|
|
.field private static final CHROME_PACKAGES:[Ljava/lang/String;
|
|
|
|
.field public static final INSTANCE:Lcom/facebook/internal/CustomTabUtils;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 3
|
|
|
|
new-instance v0, Lcom/facebook/internal/CustomTabUtils;
|
|
|
|
invoke-direct {v0}, Lcom/facebook/internal/CustomTabUtils;-><init>()V
|
|
|
|
sput-object v0, Lcom/facebook/internal/CustomTabUtils;->INSTANCE:Lcom/facebook/internal/CustomTabUtils;
|
|
|
|
const-string v0, "com.chrome.beta"
|
|
|
|
const-string v1, "com.chrome.dev"
|
|
|
|
const-string v2, "com.android.chrome"
|
|
|
|
filled-new-array {v2, v0, v1}, [Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/facebook/internal/CustomTabUtils;->CHROME_PACKAGES:[Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 17
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final getChromePackage()Ljava/lang/String;
|
|
.locals 6
|
|
|
|
const-class v0, Lcom/facebook/internal/CustomTabUtils;
|
|
|
|
invoke-static {v0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->isObjectCrashing(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
return-object v2
|
|
|
|
.line 44
|
|
:cond_0
|
|
:try_start_0
|
|
invoke-static {}, Lcom/facebook/FacebookSdk;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
.line 45
|
|
new-instance v3, Landroid/content/Intent;
|
|
|
|
const-string v4, "android.support.customtabs.action.CustomTabsService"
|
|
|
|
invoke-direct {v3, v4}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 46
|
|
invoke-virtual {v1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-virtual {v1, v3, v4}, Landroid/content/pm/PackageManager;->queryIntentServices(Landroid/content/Intent;I)Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v3, "context.packageManager.queryIntentServices(serviceIntent, 0)"
|
|
|
|
invoke-static {v1, v3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Lcom/facebook/internal/CustomTabUtils;->CHROME_PACKAGES:[Ljava/lang/String;
|
|
|
|
.line 48
|
|
invoke-static {v3}, Lkotlin/collections/ArraysKt;->toHashSet([Ljava/lang/Object;)Ljava/util/HashSet;
|
|
|
|
move-result-object v3
|
|
|
|
.line 49
|
|
invoke-interface {v1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:cond_1
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Landroid/content/pm/ResolveInfo;
|
|
|
|
.line 50
|
|
iget-object v4, v4, Landroid/content/pm/ResolveInfo;->serviceInfo:Landroid/content/pm/ServiceInfo;
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
.line 51
|
|
iget-object v5, v4, Landroid/content/pm/ServiceInfo;->packageName:Ljava/lang/String;
|
|
|
|
invoke-interface {v3, v5}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_1
|
|
|
|
.line 52
|
|
iget-object v0, v4, Landroid/content/pm/ServiceInfo;->packageName:Ljava/lang/String;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
return-object v0
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
return-object v2
|
|
|
|
.line 56
|
|
:goto_0
|
|
invoke-static {v1, v0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->handleThrowable(Ljava/lang/Throwable;Ljava/lang/Object;)V
|
|
|
|
return-object v2
|
|
.end method
|
|
|
|
.method public static final getDefaultRedirectURI()Ljava/lang/String;
|
|
.locals 4
|
|
|
|
const-class v0, Lcom/facebook/internal/CustomTabUtils;
|
|
|
|
invoke-static {v0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->isObjectCrashing(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
return-object v2
|
|
|
|
:cond_0
|
|
:try_start_0
|
|
const-string v1, "fbconnect://cct."
|
|
|
|
.line 23
|
|
invoke-static {}, Lcom/facebook/FacebookSdk;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v1, v3}, Lkotlin/jvm/internal/Intrinsics;->stringPlus(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
return-object v0
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
invoke-static {v1, v0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->handleThrowable(Ljava/lang/Throwable;Ljava/lang/Object;)V
|
|
|
|
return-object v2
|
|
.end method
|
|
|
|
.method public static final getValidRedirectURI(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 3
|
|
|
|
const-class v0, Lcom/facebook/internal/CustomTabUtils;
|
|
|
|
invoke-static {v0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->isObjectCrashing(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
return-object v2
|
|
|
|
:cond_0
|
|
:try_start_0
|
|
const-string v1, "developerDefinedRedirectURI"
|
|
|
|
invoke-static {p0, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 29
|
|
sget-object v1, Lcom/facebook/internal/Validate;->INSTANCE:Lcom/facebook/internal/Validate;
|
|
|
|
invoke-static {}, Lcom/facebook/FacebookSdk;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1, p0}, Lcom/facebook/internal/Validate;->hasCustomTabRedirectActivity(Landroid/content/Context;Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
return-object p0
|
|
|
|
.line 34
|
|
:cond_1
|
|
invoke-static {}, Lcom/facebook/FacebookSdk;->getApplicationContext()Landroid/content/Context;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {}, Lcom/facebook/internal/CustomTabUtils;->getDefaultRedirectURI()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {p0, v1}, Lcom/facebook/internal/Validate;->hasCustomTabRedirectActivity(Landroid/content/Context;Ljava/lang/String;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_2
|
|
|
|
.line 36
|
|
invoke-static {}, Lcom/facebook/internal/CustomTabUtils;->getDefaultRedirectURI()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const-string p0, ""
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
return-object p0
|
|
|
|
.line 39
|
|
:goto_0
|
|
invoke-static {p0, v0}, Lcom/facebook/internal/instrument/crashshield/CrashShieldHandler;->handleThrowable(Ljava/lang/Throwable;Ljava/lang/Object;)V
|
|
|
|
return-object v2
|
|
.end method
|