- 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
279 lines
6.2 KiB
Smali
279 lines
6.2 KiB
Smali
.class public final Landroidx/core/content/PermissionChecker;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Landroidx/core/content/PermissionChecker$PermissionResult;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final PERMISSION_DENIED:I = -0x1
|
|
|
|
.field public static final PERMISSION_DENIED_APP_OP:I = -0x2
|
|
|
|
.field public static final PERMISSION_GRANTED:I
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 77
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static checkCallingOrSelfPermission(Landroid/content/Context;Ljava/lang/String;)I
|
|
.locals 3
|
|
.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
|
|
|
|
.line 179
|
|
invoke-static {}, Landroid/os/Binder;->getCallingPid()I
|
|
|
|
move-result v0
|
|
|
|
invoke-static {}, Landroid/os/Process;->myPid()I
|
|
|
|
move-result v1
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
.line 180
|
|
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
.line 181
|
|
:goto_0
|
|
invoke-static {}, Landroid/os/Binder;->getCallingPid()I
|
|
|
|
move-result v1
|
|
|
|
.line 182
|
|
invoke-static {}, Landroid/os/Binder;->getCallingUid()I
|
|
|
|
move-result v2
|
|
|
|
.line 181
|
|
invoke-static {p0, p1, v1, v2, v0}, Landroidx/core/content/PermissionChecker;->checkPermission(Landroid/content/Context;Ljava/lang/String;IILjava/lang/String;)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static checkCallingPermission(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)I
|
|
.locals 2
|
|
.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
|
|
.param p2 # Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 160
|
|
invoke-static {}, Landroid/os/Binder;->getCallingPid()I
|
|
|
|
move-result v0
|
|
|
|
invoke-static {}, Landroid/os/Process;->myPid()I
|
|
|
|
move-result v1
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
const/4 p0, -0x1
|
|
|
|
return p0
|
|
|
|
.line 163
|
|
:cond_0
|
|
invoke-static {}, Landroid/os/Binder;->getCallingPid()I
|
|
|
|
move-result v0
|
|
|
|
.line 164
|
|
invoke-static {}, Landroid/os/Binder;->getCallingUid()I
|
|
|
|
move-result v1
|
|
|
|
.line 163
|
|
invoke-static {p0, p1, v0, v1, p2}, Landroidx/core/content/PermissionChecker;->checkPermission(Landroid/content/Context;Ljava/lang/String;IILjava/lang/String;)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static checkPermission(Landroid/content/Context;Ljava/lang/String;IILjava/lang/String;)I
|
|
.locals 2
|
|
.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
|
|
.param p4 # Ljava/lang/String;
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 97
|
|
invoke-virtual {p0, p1, p2, p3}, Landroid/content/Context;->checkPermission(Ljava/lang/String;II)I
|
|
|
|
move-result p2
|
|
|
|
const/4 v0, -0x1
|
|
|
|
if-ne p2, v0, :cond_0
|
|
|
|
return v0
|
|
|
|
.line 101
|
|
:cond_0
|
|
invoke-static {p1}, Landroidx/core/app/AppOpsManagerCompat;->permissionToOp(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p2, 0x0
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
return p2
|
|
|
|
:cond_1
|
|
if-nez p4, :cond_4
|
|
|
|
.line 107
|
|
invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;
|
|
|
|
move-result-object p4
|
|
|
|
invoke-virtual {p4, p3}, Landroid/content/pm/PackageManager;->getPackagesForUid(I)[Ljava/lang/String;
|
|
|
|
move-result-object p4
|
|
|
|
if-eqz p4, :cond_3
|
|
|
|
.line 108
|
|
array-length v1, p4
|
|
|
|
if-gtz v1, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
.line 111
|
|
:cond_2
|
|
aget-object p4, p4, p2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
:goto_0
|
|
return v0
|
|
|
|
.line 114
|
|
:cond_4
|
|
:goto_1
|
|
invoke-static {}, Landroid/os/Process;->myUid()I
|
|
|
|
move-result v0
|
|
|
|
.line 115
|
|
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
if-ne v0, p3, :cond_5
|
|
|
|
.line 117
|
|
invoke-static {v1, p4}, Landroidx/core/util/ObjectsCompat;->equals(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
.line 121
|
|
invoke-static {p0, p3, p1, p4}, Landroidx/core/app/AppOpsManagerCompat;->checkOrNoteProxyOp(Landroid/content/Context;ILjava/lang/String;Ljava/lang/String;)I
|
|
|
|
move-result p0
|
|
|
|
goto :goto_2
|
|
|
|
.line 123
|
|
:cond_5
|
|
invoke-static {p0, p1, p4}, Landroidx/core/app/AppOpsManagerCompat;->noteProxyOpNoThrow(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
move-result p0
|
|
|
|
:goto_2
|
|
if-nez p0, :cond_6
|
|
|
|
goto :goto_3
|
|
|
|
:cond_6
|
|
const/4 p2, -0x2
|
|
|
|
:goto_3
|
|
return p2
|
|
.end method
|
|
|
|
.method public static checkSelfPermission(Landroid/content/Context;Ljava/lang/String;)I
|
|
.locals 3
|
|
.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
|
|
|
|
.line 142
|
|
invoke-static {}, Landroid/os/Process;->myPid()I
|
|
|
|
move-result v0
|
|
|
|
.line 143
|
|
invoke-static {}, Landroid/os/Process;->myUid()I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
.line 142
|
|
invoke-static {p0, p1, v0, v1, v2}, Landroidx/core/content/PermissionChecker;->checkPermission(Landroid/content/Context;Ljava/lang/String;IILjava/lang/String;)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|