.class public Landroidx/core/app/ShareCompat$IntentReader; .super Ljava/lang/Object; .source "SourceFile" # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Landroidx/core/app/ShareCompat; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x9 name = "IntentReader" .end annotation # static fields .field private static final TAG:Ljava/lang/String; = "IntentReader" # instance fields .field private final mCallingActivity:Landroid/content/ComponentName; .annotation build Landroidx/annotation/Nullable; .end annotation .end field .field private final mCallingPackage:Ljava/lang/String; .annotation build Landroidx/annotation/Nullable; .end annotation .end field .field private final mContext:Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end field .field private final mIntent:Landroid/content/Intent; .annotation build Landroidx/annotation/NonNull; .end annotation .end field .field private mStreams:Ljava/util/ArrayList; .annotation build Landroidx/annotation/Nullable; .end annotation .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/ArrayList<", "Landroid/net/Uri;", ">;" } .end annotation .end field # direct methods .method public constructor (Landroid/app/Activity;)V .locals 1 .param p1 # Landroid/app/Activity; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .line 728 invoke-static {p1}, Landroidx/core/util/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroid/content/Context; invoke-virtual {p1}, Landroid/app/Activity;->getIntent()Landroid/content/Intent; move-result-object p1 invoke-direct {p0, v0, p1}, Landroidx/core/app/ShareCompat$IntentReader;->(Landroid/content/Context;Landroid/content/Intent;)V return-void .end method .method public constructor (Landroid/content/Context;Landroid/content/Intent;)V .locals 0 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # Landroid/content/Intent; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .line 738 invoke-direct {p0}, Ljava/lang/Object;->()V .line 739 invoke-static {p1}, Landroidx/core/util/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p1 check-cast p1, Landroid/content/Context; iput-object p1, p0, Landroidx/core/app/ShareCompat$IntentReader;->mContext:Landroid/content/Context; .line 740 invoke-static {p2}, Landroidx/core/util/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p1 check-cast p1, Landroid/content/Intent; iput-object p1, p0, Landroidx/core/app/ShareCompat$IntentReader;->mIntent:Landroid/content/Intent; .line 741 invoke-static {p2}, Landroidx/core/app/ShareCompat;->getCallingPackage(Landroid/content/Intent;)Ljava/lang/String; move-result-object p1 iput-object p1, p0, Landroidx/core/app/ShareCompat$IntentReader;->mCallingPackage:Ljava/lang/String; .line 742 invoke-static {p2}, Landroidx/core/app/ShareCompat;->getCallingActivity(Landroid/content/Intent;)Landroid/content/ComponentName; move-result-object p1 iput-object p1, p0, Landroidx/core/app/ShareCompat$IntentReader;->mCallingActivity:Landroid/content/ComponentName; return-void .end method .method public static from(Landroid/app/Activity;)Landroidx/core/app/ShareCompat$IntentReader; .locals 1 .param p0 # Landroid/app/Activity; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .annotation build Landroidx/annotation/NonNull; .end annotation .annotation runtime Ljava/lang/Deprecated; .end annotation .line 718 new-instance v0, Landroidx/core/app/ShareCompat$IntentReader; invoke-direct {v0, p0}, Landroidx/core/app/ShareCompat$IntentReader;->(Landroid/app/Activity;)V return-object v0 .end method # virtual methods .method public getCallingActivity()Landroid/content/ComponentName; .locals 1 .annotation build Landroidx/annotation/Nullable; .end annotation iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mCallingActivity:Landroid/content/ComponentName; return-object v0 .end method .method public getCallingActivityIcon()Landroid/graphics/drawable/Drawable; .locals 4 .annotation build Landroidx/annotation/Nullable; .end annotation iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mCallingActivity:Landroid/content/ComponentName; const/4 v1, 0x0 if-nez v0, :cond_0 return-object v1 :cond_0 iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mContext:Landroid/content/Context; .line 983 invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager; move-result-object v0 :try_start_0 iget-object v2, p0, Landroidx/core/app/ShareCompat$IntentReader;->mCallingActivity:Landroid/content/ComponentName; .line 985 invoke-virtual {v0, v2}, Landroid/content/pm/PackageManager;->getActivityIcon(Landroid/content/ComponentName;)Landroid/graphics/drawable/Drawable; move-result-object v0 :try_end_0 .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0 return-object v0 :catch_0 move-exception v0 const-string v2, "IntentReader" const-string v3, "Could not retrieve icon for calling activity" .line 987 invoke-static {v2, v3, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I return-object v1 .end method .method public getCallingApplicationIcon()Landroid/graphics/drawable/Drawable; .locals 4 .annotation build Landroidx/annotation/Nullable; .end annotation iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mCallingPackage:Ljava/lang/String; const/4 v1, 0x0 if-nez v0, :cond_0 return-object v1 :cond_0 iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mContext:Landroid/content/Context; .line 1006 invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager; move-result-object v0 :try_start_0 iget-object v2, p0, Landroidx/core/app/ShareCompat$IntentReader;->mCallingPackage:Ljava/lang/String; .line 1008 invoke-virtual {v0, v2}, Landroid/content/pm/PackageManager;->getApplicationIcon(Ljava/lang/String;)Landroid/graphics/drawable/Drawable; move-result-object v0 :try_end_0 .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0 return-object v0 :catch_0 move-exception v0 const-string v2, "IntentReader" const-string v3, "Could not retrieve icon for calling application" .line 1010 invoke-static {v2, v3, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I return-object v1 .end method .method public getCallingApplicationLabel()Ljava/lang/CharSequence; .locals 4 .annotation build Landroidx/annotation/Nullable; .end annotation iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mCallingPackage:Ljava/lang/String; const/4 v1, 0x0 if-nez v0, :cond_0 return-object v1 :cond_0 iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mContext:Landroid/content/Context; .line 1030 invoke-virtual {v0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager; move-result-object v0 :try_start_0 iget-object v2, p0, Landroidx/core/app/ShareCompat$IntentReader;->mCallingPackage:Ljava/lang/String; const/4 v3, 0x0 .line 1032 invoke-virtual {v0, v2, v3}, Landroid/content/pm/PackageManager;->getApplicationInfo(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo; move-result-object v2 invoke-virtual {v0, v2}, Landroid/content/pm/PackageManager;->getApplicationLabel(Landroid/content/pm/ApplicationInfo;)Ljava/lang/CharSequence; move-result-object v0 :try_end_0 .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0 return-object v0 :catch_0 move-exception v0 const-string v2, "IntentReader" const-string v3, "Could not retrieve label for calling application" .line 1034 invoke-static {v2, v3, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I return-object v1 .end method .method public getCallingPackage()Ljava/lang/String; .locals 1 .annotation build Landroidx/annotation/Nullable; .end annotation iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mCallingPackage:Ljava/lang/String; return-object v0 .end method .method public getEmailBcc()[Ljava/lang/String; .locals 2 .annotation build Landroidx/annotation/Nullable; .end annotation iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mIntent:Landroid/content/Intent; const-string v1, "android.intent.extra.BCC" .line 917 invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringArrayExtra(Ljava/lang/String;)[Ljava/lang/String; move-result-object v0 return-object v0 .end method .method public getEmailCc()[Ljava/lang/String; .locals 2 .annotation build Landroidx/annotation/Nullable; .end annotation iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mIntent:Landroid/content/Intent; const-string v1, "android.intent.extra.CC" .line 906 invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringArrayExtra(Ljava/lang/String;)[Ljava/lang/String; move-result-object v0 return-object v0 .end method .method public getEmailTo()[Ljava/lang/String; .locals 2 .annotation build Landroidx/annotation/Nullable; .end annotation iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mIntent:Landroid/content/Intent; const-string v1, "android.intent.extra.EMAIL" .line 895 invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringArrayExtra(Ljava/lang/String;)[Ljava/lang/String; move-result-object v0 return-object v0 .end method .method public getHtmlText()Ljava/lang/String; .locals 3 .annotation build Landroidx/annotation/Nullable; .end annotation iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mIntent:Landroid/content/Intent; const-string v1, "android.intent.extra.HTML_TEXT" .line 815 invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String; move-result-object v0 if-nez v0, :cond_1 .line 817 invoke-virtual {p0}, Landroidx/core/app/ShareCompat$IntentReader;->getText()Ljava/lang/CharSequence; move-result-object v1 .line 818 instance-of v2, v1, Landroid/text/Spanned; if-eqz v2, :cond_0 .line 819 check-cast v1, Landroid/text/Spanned; invoke-static {v1}, Landroid/text/Html;->toHtml(Landroid/text/Spanned;)Ljava/lang/String; move-result-object v0 goto :goto_0 :cond_0 if-eqz v1, :cond_1 .line 821 invoke-static {v1}, Landroid/text/Html;->escapeHtml(Ljava/lang/CharSequence;)Ljava/lang/String; move-result-object v0 :cond_1 :goto_0 return-object v0 .end method .method public getStream()Landroid/net/Uri; .locals 2 .annotation build Landroidx/annotation/Nullable; .end annotation iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mIntent:Landroid/content/Intent; const-string v1, "android.intent.extra.STREAM" .line 841 invoke-virtual {v0, v1}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable; move-result-object v0 check-cast v0, Landroid/net/Uri; return-object v0 .end method .method public getStream(I)Landroid/net/Uri; .locals 3 .annotation build Landroidx/annotation/Nullable; .end annotation iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mStreams:Ljava/util/ArrayList; const-string v1, "android.intent.extra.STREAM" if-nez v0, :cond_0 .line 856 invoke-virtual {p0}, Landroidx/core/app/ShareCompat$IntentReader;->isMultipleShare()Z move-result v0 if-eqz v0, :cond_0 iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mIntent:Landroid/content/Intent; .line 857 invoke-virtual {v0, v1}, Landroid/content/Intent;->getParcelableArrayListExtra(Ljava/lang/String;)Ljava/util/ArrayList; move-result-object v0 iput-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mStreams:Ljava/util/ArrayList; :cond_0 iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mStreams:Ljava/util/ArrayList; if-eqz v0, :cond_1 .line 860 invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object; move-result-object p1 check-cast p1, Landroid/net/Uri; return-object p1 :cond_1 if-nez p1, :cond_2 iget-object p1, p0, Landroidx/core/app/ShareCompat$IntentReader;->mIntent:Landroid/content/Intent; .line 863 invoke-virtual {p1, v1}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable; move-result-object p1 check-cast p1, Landroid/net/Uri; return-object p1 .line 865 :cond_2 new-instance v0, Ljava/lang/IndexOutOfBoundsException; new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1}, Ljava/lang/StringBuilder;->()V const-string v2, "Stream items available: " invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {p0}, Landroidx/core/app/ShareCompat$IntentReader;->getStreamCount()I move-result v2 invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; const-string v2, " index requested: " invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 invoke-direct {v0, p1}, Ljava/lang/IndexOutOfBoundsException;->(Ljava/lang/String;)V throw v0 .end method .method public getStreamCount()I .locals 2 iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mStreams:Ljava/util/ArrayList; const-string v1, "android.intent.extra.STREAM" if-nez v0, :cond_0 .line 878 invoke-virtual {p0}, Landroidx/core/app/ShareCompat$IntentReader;->isMultipleShare()Z move-result v0 if-eqz v0, :cond_0 iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mIntent:Landroid/content/Intent; .line 879 invoke-virtual {v0, v1}, Landroid/content/Intent;->getParcelableArrayListExtra(Ljava/lang/String;)Ljava/util/ArrayList; move-result-object v0 iput-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mStreams:Ljava/util/ArrayList; :cond_0 iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mStreams:Ljava/util/ArrayList; if-eqz v0, :cond_1 .line 882 invoke-virtual {v0}, Ljava/util/ArrayList;->size()I move-result v0 return v0 :cond_1 iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mIntent:Landroid/content/Intent; .line 884 invoke-virtual {v0, v1}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z move-result v0 return v0 .end method .method public getSubject()Ljava/lang/String; .locals 2 .annotation build Landroidx/annotation/Nullable; .end annotation iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mIntent:Landroid/content/Intent; const-string v1, "android.intent.extra.SUBJECT" .line 928 invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String; move-result-object v0 return-object v0 .end method .method public getText()Ljava/lang/CharSequence; .locals 2 .annotation build Landroidx/annotation/Nullable; .end annotation iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mIntent:Landroid/content/Intent; const-string v1, "android.intent.extra.TEXT" .line 800 invoke-virtual {v0, v1}, Landroid/content/Intent;->getCharSequenceExtra(Ljava/lang/String;)Ljava/lang/CharSequence; move-result-object v0 return-object v0 .end method .method public getType()Ljava/lang/String; .locals 1 .annotation build Landroidx/annotation/Nullable; .end annotation iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mIntent:Landroid/content/Intent; .line 789 invoke-virtual {v0}, Landroid/content/Intent;->getType()Ljava/lang/String; move-result-object v0 return-object v0 .end method .method public isMultipleShare()Z .locals 2 iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mIntent:Landroid/content/Intent; .line 778 invoke-virtual {v0}, Landroid/content/Intent;->getAction()Ljava/lang/String; move-result-object v0 const-string v1, "android.intent.action.SEND_MULTIPLE" invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v0 return v0 .end method .method public isShareIntent()Z .locals 2 iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mIntent:Landroid/content/Intent; .line 754 invoke-virtual {v0}, Landroid/content/Intent;->getAction()Ljava/lang/String; move-result-object v0 const-string v1, "android.intent.action.SEND" .line 755 invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v1 if-nez v1, :cond_1 const-string v1, "android.intent.action.SEND_MULTIPLE" invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v0 if-eqz v0, :cond_0 goto :goto_0 :cond_0 const/4 v0, 0x0 goto :goto_1 :cond_1 :goto_0 const/4 v0, 0x1 :goto_1 return v0 .end method .method public isSingleShare()Z .locals 2 iget-object v0, p0, Landroidx/core/app/ShareCompat$IntentReader;->mIntent:Landroid/content/Intent; .line 767 invoke-virtual {v0}, Landroid/content/Intent;->getAction()Ljava/lang/String; move-result-object v0 const-string v1, "android.intent.action.SEND" invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v0 return v0 .end method