Files
rr3-apk/smali/androidx/core/app/ShareCompat.smali
Daniel Elliott f3960ee359 Add Discord APKTool decompilation (Smali source for modding)
- 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
2026-02-18 16:13:44 -08:00

404 lines
11 KiB
Smali

.class public final Landroidx/core/app/ShareCompat;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Landroidx/core/app/ShareCompat$IntentBuilder;,
Landroidx/core/app/ShareCompat$IntentReader;
}
.end annotation
# static fields
.field public static final EXTRA_CALLING_ACTIVITY:Ljava/lang/String; = "androidx.core.app.EXTRA_CALLING_ACTIVITY"
.field public static final EXTRA_CALLING_ACTIVITY_INTEROP:Ljava/lang/String; = "android.support.v4.app.EXTRA_CALLING_ACTIVITY"
.field public static final EXTRA_CALLING_PACKAGE:Ljava/lang/String; = "androidx.core.app.EXTRA_CALLING_PACKAGE"
.field public static final EXTRA_CALLING_PACKAGE_INTEROP:Ljava/lang/String; = "android.support.v4.app.EXTRA_CALLING_PACKAGE"
.field private static final HISTORY_FILENAME_PREFIX:Ljava/lang/String; = ".sharecompat_"
# direct methods
.method private constructor <init>()V
.locals 0
.line 115
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static configureMenuItem(Landroid/view/Menu;ILandroidx/core/app/ShareCompat$IntentBuilder;)V
.locals 1
.param p0 # Landroid/view/Menu;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # I
.annotation build Landroidx/annotation/IdRes;
.end annotation
.end param
.param p2 # Landroidx/core/app/ShareCompat$IntentBuilder;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.line 263
invoke-interface {p0, p1}, Landroid/view/Menu;->findItem(I)Landroid/view/MenuItem;
move-result-object p0
if-eqz p0, :cond_0
.line 268
invoke-static {p0, p2}, Landroidx/core/app/ShareCompat;->configureMenuItem(Landroid/view/MenuItem;Landroidx/core/app/ShareCompat$IntentBuilder;)V
return-void
.line 265
:cond_0
new-instance p0, Ljava/lang/IllegalArgumentException;
new-instance p2, Ljava/lang/StringBuilder;
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
const-string v0, "Could not find menu item with id "
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string p1, " in the supplied menu"
invoke-virtual {p2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static configureMenuItem(Landroid/view/MenuItem;Landroidx/core/app/ShareCompat$IntentBuilder;)V
.locals 3
.param p0 # Landroid/view/MenuItem;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # Landroidx/core/app/ShareCompat$IntentBuilder;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.line 236
invoke-interface {p0}, Landroid/view/MenuItem;->getActionProvider()Landroid/view/ActionProvider;
move-result-object v0
.line 238
instance-of v1, v0, Landroid/widget/ShareActionProvider;
if-nez v1, :cond_0
.line 239
new-instance v0, Landroid/widget/ShareActionProvider;
invoke-virtual {p1}, Landroidx/core/app/ShareCompat$IntentBuilder;->getContext()Landroid/content/Context;
move-result-object v1
invoke-direct {v0, v1}, Landroid/widget/ShareActionProvider;-><init>(Landroid/content/Context;)V
goto :goto_0
.line 241
:cond_0
check-cast v0, Landroid/widget/ShareActionProvider;
.line 243
:goto_0
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, ".sharecompat_"
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 244
invoke-virtual {p1}, Landroidx/core/app/ShareCompat$IntentBuilder;->getContext()Landroid/content/Context;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
.line 243
invoke-virtual {v0, v1}, Landroid/widget/ShareActionProvider;->setShareHistoryFileName(Ljava/lang/String;)V
.line 245
invoke-virtual {p1}, Landroidx/core/app/ShareCompat$IntentBuilder;->getIntent()Landroid/content/Intent;
move-result-object p1
invoke-virtual {v0, p1}, Landroid/widget/ShareActionProvider;->setShareIntent(Landroid/content/Intent;)V
.line 246
invoke-interface {p0, v0}, Landroid/view/MenuItem;->setActionProvider(Landroid/view/ActionProvider;)Landroid/view/MenuItem;
return-void
.end method
.method public static getCallingActivity(Landroid/app/Activity;)Landroid/content/ComponentName;
.locals 1
.param p0 # Landroid/app/Activity;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/Nullable;
.end annotation
.line 175
invoke-virtual {p0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;
move-result-object v0
.line 176
invoke-virtual {p0}, Landroid/app/Activity;->getCallingActivity()Landroid/content/ComponentName;
move-result-object p0
if-nez p0, :cond_0
.line 178
invoke-static {v0}, Landroidx/core/app/ShareCompat;->getCallingActivity(Landroid/content/Intent;)Landroid/content/ComponentName;
move-result-object p0
:cond_0
return-object p0
.end method
.method public static getCallingActivity(Landroid/content/Intent;)Landroid/content/ComponentName;
.locals 1
.param p0 # Landroid/content/Intent;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/Nullable;
.end annotation
const-string v0, "androidx.core.app.EXTRA_CALLING_ACTIVITY"
.line 198
invoke-virtual {p0, v0}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;
move-result-object v0
check-cast v0, Landroid/content/ComponentName;
if-nez v0, :cond_0
const-string v0, "android.support.v4.app.EXTRA_CALLING_ACTIVITY"
.line 200
invoke-virtual {p0, v0}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;
move-result-object p0
move-object v0, p0
check-cast v0, Landroid/content/ComponentName;
:cond_0
return-object v0
.end method
.method public static getCallingPackage(Landroid/app/Activity;)Ljava/lang/String;
.locals 1
.param p0 # Landroid/app/Activity;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/Nullable;
.end annotation
.line 131
invoke-virtual {p0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;
move-result-object v0
.line 132
invoke-virtual {p0}, Landroid/app/Activity;->getCallingPackage()Ljava/lang/String;
move-result-object p0
if-nez p0, :cond_0
if-eqz v0, :cond_0
.line 134
invoke-static {v0}, Landroidx/core/app/ShareCompat;->getCallingPackage(Landroid/content/Intent;)Ljava/lang/String;
move-result-object p0
:cond_0
return-object p0
.end method
.method public static getCallingPackage(Landroid/content/Intent;)Ljava/lang/String;
.locals 1
.param p0 # Landroid/content/Intent;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation build Landroidx/annotation/Nullable;
.end annotation
const-string v0, "androidx.core.app.EXTRA_CALLING_PACKAGE"
.line 154
invoke-virtual {p0, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
if-nez v0, :cond_0
const-string v0, "android.support.v4.app.EXTRA_CALLING_PACKAGE"
.line 156
invoke-virtual {p0, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
:cond_0
return-object v0
.end method
.method public static migrateExtraStreamToClipData(Landroid/content/Intent;Ljava/util/ArrayList;)V
.locals 7
.param p0 # Landroid/content/Intent;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.param p1 # Ljava/util/ArrayList;
.annotation build Landroidx/annotation/NonNull;
.end annotation
.end param
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroid/content/Intent;",
"Ljava/util/ArrayList<",
"Landroid/net/Uri;",
">;)V"
}
.end annotation
const-string v0, "android.intent.extra.TEXT"
.line 1042
invoke-virtual {p0, v0}, Landroid/content/Intent;->getCharSequenceExtra(Ljava/lang/String;)Ljava/lang/CharSequence;
move-result-object v0
const-string v1, "android.intent.extra.HTML_TEXT"
.line 1043
invoke-virtual {p0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
.line 1045
new-instance v2, Landroid/content/ClipData;
.line 1046
invoke-virtual {p0}, Landroid/content/Intent;->getType()Ljava/lang/String;
move-result-object v3
filled-new-array {v3}, [Ljava/lang/String;
move-result-object v3
new-instance v4, Landroid/content/ClipData$Item;
const/4 v5, 0x0
.line 1047
invoke-virtual {p1, v5}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v5
check-cast v5, Landroid/net/Uri;
const/4 v6, 0x0
invoke-direct {v4, v0, v1, v6, v5}, Landroid/content/ClipData$Item;-><init>(Ljava/lang/CharSequence;Ljava/lang/String;Landroid/content/Intent;Landroid/net/Uri;)V
invoke-direct {v2, v6, v3, v4}, Landroid/content/ClipData;-><init>(Ljava/lang/CharSequence;[Ljava/lang/String;Landroid/content/ClipData$Item;)V
.line 1049
invoke-virtual {p1}, Ljava/util/ArrayList;->size()I
move-result v0
const/4 v1, 0x1
move v3, v1
:goto_0
if-ge v3, v0, :cond_0
.line 1050
invoke-virtual {p1, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v4
check-cast v4, Landroid/net/Uri;
.line 1051
new-instance v5, Landroid/content/ClipData$Item;
invoke-direct {v5, v4}, Landroid/content/ClipData$Item;-><init>(Landroid/net/Uri;)V
invoke-virtual {v2, v5}, Landroid/content/ClipData;->addItem(Landroid/content/ClipData$Item;)V
add-int/lit8 v3, v3, 0x1
goto :goto_0
.line 1054
:cond_0
invoke-virtual {p0, v2}, Landroid/content/Intent;->setClipData(Landroid/content/ClipData;)V
.line 1055
invoke-virtual {p0, v1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
return-void
.end method