2020-05-17 12:40:10 +00:00
|
|
|
.class public final Landroidx/core/app/ShareCompat;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "ShareCompat.java"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Landroidx/core/app/ShareCompat$IntentReader;,
|
|
|
|
Landroidx/core/app/ShareCompat$IntentBuilder;
|
|
|
|
}
|
|
|
|
.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 public static final HISTORY_FILENAME_PREFIX:Ljava/lang/String; = ".sharecompat_"
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
invoke-interface {p0, p1}, Landroid/view/Menu;->findItem(I)Landroid/view/MenuItem;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
|
|
|
|
invoke-static {p0, p2}, Landroidx/core/app/ShareCompat;->configureMenuItem(Landroid/view/MenuItem;Landroidx/core/app/ShareCompat$IntentBuilder;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string p2, "Could not find menu item with id "
|
|
|
|
|
|
|
|
const-string v0, " in the supplied menu"
|
|
|
|
|
2020-09-23 03:12:49 +00:00
|
|
|
invoke-static {p2, p1, v0}, Lf/e/c/a/a;->j(Ljava/lang/String;ILjava/lang/String;)Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
invoke-interface {p0}, Landroid/view/MenuItem;->getActionProvider()Landroid/view/ActionProvider;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
instance-of v1, v0, Landroid/widget/ShareActionProvider;
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
check-cast v0, Landroid/widget/ShareActionProvider;
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
const-string v1, ".sharecompat_"
|
|
|
|
|
2020-11-02 23:44:01 +00:00
|
|
|
invoke-static {v1}, Lf/e/c/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ShareActionProvider;->setShareHistoryFileName(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/app/Activity;->getCallingActivity()Landroid/content/ComponentName;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/app/Activity;->getCallingPackage()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
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
|