1059 lines
28 KiB
Smali
1059 lines
28 KiB
Smali
.class public final Lcom/blankj/utilcode/util/IntentUtils;
|
|
.super Ljava/lang/Object;
|
|
.source "IntentUtils.java"
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 2
|
|
|
|
.line 33
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 34
|
|
new-instance v0, Ljava/lang/UnsupportedOperationException;
|
|
|
|
const-string v1, "u can\'t instantiate me..."
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/UnsupportedOperationException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static getCallIntent(Ljava/lang/String;)Landroid/content/Intent;
|
|
.locals 3
|
|
|
|
const-string v0, "Argument \'phoneNumber\' of type String (#0 out of 1, zero-based) is marked by @android.support.annotation.NonNull but got null for it"
|
|
|
|
.line 419
|
|
invoke-static {p0, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
.line 420
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "tel:"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {p0}, Landroid/net/Uri;->encode(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v1, "android.intent.action.CALL"
|
|
|
|
invoke-direct {v0, v1, p0}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
|
|
|
|
const/4 p0, 0x1
|
|
|
|
.line 421
|
|
invoke-static {v0, p0}, Lcom/blankj/utilcode/util/IntentUtils;->getIntent(Landroid/content/Intent;Z)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getCaptureIntent(Landroid/net/Uri;)Landroid/content/Intent;
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 445
|
|
invoke-static {p0, v0}, Lcom/blankj/utilcode/util/IntentUtils;->getCaptureIntent(Landroid/net/Uri;Z)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getCaptureIntent(Landroid/net/Uri;Z)Landroid/content/Intent;
|
|
.locals 2
|
|
|
|
.line 456
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-string v1, "android.media.action.IMAGE_CAPTURE"
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
const-string v1, "output"
|
|
|
|
.line 457
|
|
invoke-virtual {v0, v1, p0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
|
|
|
|
const/4 p0, 0x1
|
|
|
|
.line 458
|
|
invoke-virtual {v0, p0}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
|
|
|
|
.line 459
|
|
invoke-static {v0, p1}, Lcom/blankj/utilcode/util/IntentUtils;->getIntent(Landroid/content/Intent;Z)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getComponentIntent(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 329
|
|
invoke-static {p0, p1, v0, v1}, Lcom/blankj/utilcode/util/IntentUtils;->getComponentIntent(Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;Z)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getComponentIntent(Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent;
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 357
|
|
invoke-static {p0, p1, p2, v0}, Lcom/blankj/utilcode/util/IntentUtils;->getComponentIntent(Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;Z)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getComponentIntent(Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;Z)Landroid/content/Intent;
|
|
.locals 1
|
|
|
|
.line 373
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
.line 374
|
|
invoke-virtual {v0, p2}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;
|
|
|
|
.line 375
|
|
:cond_0
|
|
new-instance p2, Landroid/content/ComponentName;
|
|
|
|
invoke-direct {p2, p0, p1}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 376
|
|
invoke-virtual {v0, p2}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
|
|
|
|
.line 377
|
|
invoke-static {v0, p3}, Lcom/blankj/utilcode/util/IntentUtils;->getIntent(Landroid/content/Intent;Z)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getComponentIntent(Ljava/lang/String;Ljava/lang/String;Z)Landroid/content/Intent;
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 343
|
|
invoke-static {p0, p1, v0, p2}, Lcom/blankj/utilcode/util/IntentUtils;->getComponentIntent(Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;Z)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getDialIntent(Ljava/lang/String;)Landroid/content/Intent;
|
|
.locals 3
|
|
|
|
const-string v0, "Argument \'phoneNumber\' of type String (#0 out of 1, zero-based) is marked by @android.support.annotation.NonNull but got null for it"
|
|
|
|
.line 406
|
|
invoke-static {p0, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
.line 407
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "tel:"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {p0}, Landroid/net/Uri;->encode(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v1, "android.intent.action.DIAL"
|
|
|
|
invoke-direct {v0, v1, p0}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
|
|
|
|
const/4 p0, 0x1
|
|
|
|
.line 408
|
|
invoke-static {v0, p0}, Lcom/blankj/utilcode/util/IntentUtils;->getIntent(Landroid/content/Intent;Z)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getInstallAppIntent(Landroid/net/Uri;)Landroid/content/Intent;
|
|
.locals 2
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
const/4 p0, 0x0
|
|
|
|
return-object p0
|
|
|
|
.line 92
|
|
:cond_0
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-string v1, "android.intent.action.VIEW"
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
const-string v1, "application/vnd.android.package-archive"
|
|
|
|
.line 94
|
|
invoke-virtual {v0, p0, v1}, Landroid/content/Intent;->setDataAndType(Landroid/net/Uri;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 95
|
|
sget p0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x18
|
|
|
|
if-lt p0, v1, :cond_1
|
|
|
|
const/4 p0, 0x1
|
|
|
|
.line 96
|
|
invoke-virtual {v0, p0}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
|
|
|
|
:cond_1
|
|
const/high16 p0, 0x10000000
|
|
|
|
.line 98
|
|
invoke-virtual {v0, p0}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getInstallAppIntent(Ljava/io/File;)Landroid/content/Intent;
|
|
.locals 2
|
|
|
|
.line 71
|
|
invoke-static {p0}, Lcom/blankj/utilcode/util/UtilsBridge;->isFileExists(Ljava/io/File;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 p0, 0x0
|
|
|
|
return-object p0
|
|
|
|
.line 73
|
|
:cond_0
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x18
|
|
|
|
if-ge v0, v1, :cond_1
|
|
|
|
.line 74
|
|
invoke-static {p0}, Landroid/net/Uri;->fromFile(Ljava/io/File;)Landroid/net/Uri;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_0
|
|
|
|
.line 76
|
|
:cond_1
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-static {}, Lcom/blankj/utilcode/util/Utils;->getApp()Landroid/app/Application;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Landroid/app/Application;->getPackageName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, ".utilcode.provider"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 77
|
|
invoke-static {}, Lcom/blankj/utilcode/util/Utils;->getApp()Landroid/app/Application;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1, v0, p0}, Landroidx/core/content/FileProvider;->getUriForFile(Landroid/content/Context;Ljava/lang/String;Ljava/io/File;)Landroid/net/Uri;
|
|
|
|
move-result-object p0
|
|
|
|
.line 79
|
|
:goto_0
|
|
invoke-static {p0}, Lcom/blankj/utilcode/util/IntentUtils;->getInstallAppIntent(Landroid/net/Uri;)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getInstallAppIntent(Ljava/lang/String;)Landroid/content/Intent;
|
|
.locals 0
|
|
|
|
.line 59
|
|
invoke-static {p0}, Lcom/blankj/utilcode/util/UtilsBridge;->getFileByPath(Ljava/lang/String;)Ljava/io/File;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p0}, Lcom/blankj/utilcode/util/IntentUtils;->getInstallAppIntent(Ljava/io/File;)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private static getIntent(Landroid/content/Intent;Z)Landroid/content/Intent;
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/high16 p1, 0x10000000
|
|
|
|
.line 463
|
|
invoke-virtual {p0, p1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
:cond_0
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getLaunchAppDetailsSettingsIntent(Ljava/lang/String;)Landroid/content/Intent;
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 137
|
|
invoke-static {p0, v0}, Lcom/blankj/utilcode/util/IntentUtils;->getLaunchAppDetailsSettingsIntent(Ljava/lang/String;Z)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getLaunchAppDetailsSettingsIntent(Ljava/lang/String;Z)Landroid/content/Intent;
|
|
.locals 3
|
|
|
|
.line 147
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-string v1, "android.settings.APPLICATION_DETAILS_SETTINGS"
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 148
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "package:"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v0, p0}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;
|
|
|
|
.line 149
|
|
invoke-static {v0, p1}, Lcom/blankj/utilcode/util/IntentUtils;->getIntent(Landroid/content/Intent;Z)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getLaunchAppIntent(Ljava/lang/String;)Landroid/content/Intent;
|
|
.locals 3
|
|
|
|
.line 122
|
|
invoke-static {p0}, Lcom/blankj/utilcode/util/UtilsBridge;->getLauncherActivity(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 123
|
|
invoke-static {v0}, Lcom/blankj/utilcode/util/UtilsBridge;->isSpace(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const/4 p0, 0x0
|
|
|
|
return-object p0
|
|
|
|
.line 124
|
|
:cond_0
|
|
new-instance v1, Landroid/content/Intent;
|
|
|
|
const-string v2, "android.intent.action.MAIN"
|
|
|
|
invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
const-string v2, "android.intent.category.LAUNCHER"
|
|
|
|
.line 125
|
|
invoke-virtual {v1, v2}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 126
|
|
invoke-virtual {v1, p0, v0}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
const/high16 p0, 0x10000000
|
|
|
|
.line 127
|
|
invoke-virtual {v1, p0}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getSendSmsIntent(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
.locals 2
|
|
|
|
const-string v0, "Argument \'phoneNumber\' of type String (#0 out of 2, zero-based) is marked by @android.support.annotation.NonNull but got null for it"
|
|
|
|
.line 431
|
|
invoke-static {p0, v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
.line 432
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "smsto:"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0}, Landroid/net/Uri;->encode(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
move-result-object p0
|
|
|
|
.line 433
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-string v1, "android.intent.action.SENDTO"
|
|
|
|
invoke-direct {v0, v1, p0}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V
|
|
|
|
const-string p0, "sms_body"
|
|
|
|
.line 434
|
|
invoke-virtual {v0, p0, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
const/4 p0, 0x1
|
|
|
|
.line 435
|
|
invoke-static {v0, p0}, Lcom/blankj/utilcode/util/IntentUtils;->getIntent(Landroid/content/Intent;Z)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getShareImageIntent(Landroid/net/Uri;)Landroid/content/Intent;
|
|
.locals 1
|
|
|
|
const-string v0, ""
|
|
|
|
.line 193
|
|
invoke-static {v0, p0}, Lcom/blankj/utilcode/util/IntentUtils;->getShareTextImageIntent(Ljava/lang/String;Landroid/net/Uri;)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getShareImageIntent(Ljava/io/File;)Landroid/content/Intent;
|
|
.locals 1
|
|
|
|
const-string v0, ""
|
|
|
|
.line 183
|
|
invoke-static {v0, p0}, Lcom/blankj/utilcode/util/IntentUtils;->getShareTextImageIntent(Ljava/lang/String;Ljava/io/File;)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getShareImageIntent(Ljava/lang/String;)Landroid/content/Intent;
|
|
.locals 1
|
|
|
|
const-string v0, ""
|
|
|
|
.line 173
|
|
invoke-static {v0, p0}, Lcom/blankj/utilcode/util/IntentUtils;->getShareTextImageIntent(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getShareImageIntent(Ljava/util/ArrayList;)Landroid/content/Intent;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/ArrayList<",
|
|
"Landroid/net/Uri;",
|
|
">;)",
|
|
"Landroid/content/Intent;"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, ""
|
|
|
|
.line 261
|
|
invoke-static {v0, p0}, Lcom/blankj/utilcode/util/IntentUtils;->getShareTextImageIntent(Ljava/lang/String;Ljava/util/ArrayList;)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getShareImageIntent(Ljava/util/LinkedList;)Landroid/content/Intent;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/LinkedList<",
|
|
"Ljava/lang/String;",
|
|
">;)",
|
|
"Landroid/content/Intent;"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, ""
|
|
|
|
.line 241
|
|
invoke-static {v0, p0}, Lcom/blankj/utilcode/util/IntentUtils;->getShareTextImageIntent(Ljava/lang/String;Ljava/util/LinkedList;)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getShareImageIntent(Ljava/util/List;)Landroid/content/Intent;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Ljava/io/File;",
|
|
">;)",
|
|
"Landroid/content/Intent;"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, ""
|
|
|
|
.line 251
|
|
invoke-static {v0, p0}, Lcom/blankj/utilcode/util/IntentUtils;->getShareTextImageIntent(Ljava/lang/String;Ljava/util/List;)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getShareTextImageIntent(Ljava/lang/String;Landroid/net/Uri;)Landroid/content/Intent;
|
|
.locals 2
|
|
|
|
.line 226
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-string v1, "android.intent.action.SEND"
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
const-string v1, "android.intent.extra.TEXT"
|
|
|
|
.line 227
|
|
invoke-virtual {v0, v1, p0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
const-string p0, "android.intent.extra.STREAM"
|
|
|
|
.line 228
|
|
invoke-virtual {v0, p0, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
|
|
|
|
const-string p0, "image/*"
|
|
|
|
.line 229
|
|
invoke-virtual {v0, p0}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
const-string p0, ""
|
|
|
|
.line 230
|
|
invoke-static {v0, p0}, Landroid/content/Intent;->createChooser(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
.line 231
|
|
invoke-static {p0, p1}, Lcom/blankj/utilcode/util/IntentUtils;->getIntent(Landroid/content/Intent;Z)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getShareTextImageIntent(Ljava/lang/String;Ljava/io/File;)Landroid/content/Intent;
|
|
.locals 0
|
|
|
|
.line 215
|
|
invoke-static {p1}, Lcom/blankj/utilcode/util/UtilsBridge;->file2Uri(Ljava/io/File;)Landroid/net/Uri;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p0, p1}, Lcom/blankj/utilcode/util/IntentUtils;->getShareTextImageIntent(Ljava/lang/String;Landroid/net/Uri;)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getShareTextImageIntent(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
.locals 0
|
|
|
|
.line 204
|
|
invoke-static {p1}, Lcom/blankj/utilcode/util/UtilsBridge;->getFileByPath(Ljava/lang/String;)Ljava/io/File;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p0, p1}, Lcom/blankj/utilcode/util/IntentUtils;->getShareTextImageIntent(Ljava/lang/String;Ljava/io/File;)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getShareTextImageIntent(Ljava/lang/String;Ljava/util/ArrayList;)Landroid/content/Intent;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
"Ljava/util/ArrayList<",
|
|
"Landroid/net/Uri;",
|
|
">;)",
|
|
"Landroid/content/Intent;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 313
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-string v1, "android.intent.action.SEND_MULTIPLE"
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
const-string v1, "android.intent.extra.TEXT"
|
|
|
|
.line 314
|
|
invoke-virtual {v0, v1, p0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
const-string p0, "android.intent.extra.STREAM"
|
|
|
|
.line 315
|
|
invoke-virtual {v0, p0, p1}, Landroid/content/Intent;->putParcelableArrayListExtra(Ljava/lang/String;Ljava/util/ArrayList;)Landroid/content/Intent;
|
|
|
|
const-string p0, "image/*"
|
|
|
|
.line 316
|
|
invoke-virtual {v0, p0}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
const-string p0, ""
|
|
|
|
.line 317
|
|
invoke-static {v0, p0}, Landroid/content/Intent;->createChooser(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
.line 318
|
|
invoke-static {p0, p1}, Lcom/blankj/utilcode/util/IntentUtils;->getIntent(Landroid/content/Intent;Z)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getShareTextImageIntent(Ljava/lang/String;Ljava/util/LinkedList;)Landroid/content/Intent;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
"Ljava/util/LinkedList<",
|
|
"Ljava/lang/String;",
|
|
">;)",
|
|
"Landroid/content/Intent;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 273
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 275
|
|
invoke-virtual {p1}, Ljava/util/LinkedList;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/String;
|
|
|
|
.line 276
|
|
invoke-static {v1}, Lcom/blankj/utilcode/util/UtilsBridge;->getFileByPath(Ljava/lang/String;)Ljava/io/File;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 278
|
|
invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
.line 282
|
|
:cond_1
|
|
invoke-static {p0, v0}, Lcom/blankj/utilcode/util/IntentUtils;->getShareTextImageIntent(Ljava/lang/String;Ljava/util/List;)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getShareTextImageIntent(Ljava/lang/String;Ljava/util/List;)Landroid/content/Intent;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
"Ljava/util/List<",
|
|
"Ljava/io/File;",
|
|
">;)",
|
|
"Landroid/content/Intent;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 293
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 295
|
|
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/io/File;
|
|
|
|
.line 296
|
|
invoke-static {v1}, Lcom/blankj/utilcode/util/UtilsBridge;->file2Uri(Ljava/io/File;)Landroid/net/Uri;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 298
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
.line 302
|
|
:cond_1
|
|
invoke-static {p0, v0}, Lcom/blankj/utilcode/util/IntentUtils;->getShareTextImageIntent(Ljava/lang/String;Ljava/util/ArrayList;)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getShareTextIntent(Ljava/lang/String;)Landroid/content/Intent;
|
|
.locals 2
|
|
|
|
.line 159
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-string v1, "android.intent.action.SEND"
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
const-string v1, "text/plain"
|
|
|
|
.line 160
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
const-string v1, "android.intent.extra.TEXT"
|
|
|
|
.line 161
|
|
invoke-virtual {v0, v1, p0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
const-string p0, ""
|
|
|
|
.line 162
|
|
invoke-static {v0, p0}, Landroid/content/Intent;->createChooser(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 163
|
|
invoke-static {p0, v0}, Lcom/blankj/utilcode/util/IntentUtils;->getIntent(Landroid/content/Intent;Z)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getShutdownIntent()Landroid/content/Intent;
|
|
.locals 3
|
|
|
|
.line 391
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x1a
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
.line 392
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-string v1, "com.android.internal.intent.action.REQUEST_SHUTDOWN"
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 394
|
|
:cond_0
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-string v1, "android.intent.action.ACTION_REQUEST_SHUTDOWN"
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
:goto_0
|
|
const/4 v1, 0x0
|
|
|
|
const-string v2, "android.intent.extra.KEY_CONFIRM"
|
|
|
|
.line 396
|
|
invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
|
|
|
|
const/high16 v1, 0x10000000
|
|
|
|
.line 397
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static getUninstallAppIntent(Ljava/lang/String;)Landroid/content/Intent;
|
|
.locals 3
|
|
|
|
.line 110
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-string v1, "android.intent.action.DELETE"
|
|
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 111
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "package:"
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v0, p0}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;
|
|
|
|
const/high16 p0, 0x10000000
|
|
|
|
.line 112
|
|
invoke-virtual {v0, p0}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static isIntentAvailable(Landroid/content/Intent;)Z
|
|
.locals 2
|
|
|
|
.line 44
|
|
invoke-static {}, Lcom/blankj/utilcode/util/Utils;->getApp()Landroid/app/Application;
|
|
|
|
move-result-object v0
|
|
|
|
.line 45
|
|
invoke-virtual {v0}, Landroid/app/Application;->getPackageManager()Landroid/content/pm/PackageManager;
|
|
|
|
move-result-object v0
|
|
|
|
const/high16 v1, 0x10000
|
|
|
|
.line 46
|
|
invoke-virtual {v0, p0, v1}, Landroid/content/pm/PackageManager;->queryIntentActivities(Landroid/content/Intent;I)Ljava/util/List;
|
|
|
|
move-result-object p0
|
|
|
|
.line 47
|
|
invoke-interface {p0}, Ljava/util/List;->size()I
|
|
|
|
move-result p0
|
|
|
|
if-lez p0, :cond_0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
:goto_0
|
|
return p0
|
|
.end method
|