2019-02-04 20:08:30 +00:00
|
|
|
.class public final Landroidx/core/view/inputmethod/InputConnectionCompat;
|
|
|
|
.super Ljava/lang/Object;
|
2019-02-04 20:29:01 +00:00
|
|
|
.source "InputConnectionCompat.java"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Landroidx/core/view/inputmethod/InputConnectionCompat$OnCommitContentListener;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field private static final COMMIT_CONTENT_ACTION:Ljava/lang/String; = "androidx.core.view.inputmethod.InputConnectionCompat.COMMIT_CONTENT"
|
|
|
|
|
|
|
|
.field private static final COMMIT_CONTENT_CONTENT_URI_KEY:Ljava/lang/String; = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_URI"
|
|
|
|
|
|
|
|
.field private static final COMMIT_CONTENT_DESCRIPTION_KEY:Ljava/lang/String; = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_DESCRIPTION"
|
|
|
|
|
|
|
|
.field private static final COMMIT_CONTENT_FLAGS_KEY:Ljava/lang/String; = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_FLAGS"
|
|
|
|
|
|
|
|
.field private static final COMMIT_CONTENT_LINK_URI_KEY:Ljava/lang/String; = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_LINK_URI"
|
|
|
|
|
|
|
|
.field private static final COMMIT_CONTENT_OPTS_KEY:Ljava/lang/String; = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_OPTS"
|
|
|
|
|
|
|
|
.field private static final COMMIT_CONTENT_RESULT_RECEIVER:Ljava/lang/String; = "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_RESULT_RECEIVER"
|
|
|
|
|
|
|
|
.field public static final INPUT_CONTENT_GRANT_READ_URI_PERMISSION:I = 0x1
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
.annotation runtime Ljava/lang/Deprecated;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static commitContent(Landroid/view/inputmethod/InputConnection;Landroid/view/inputmethod/EditorInfo;Landroidx/core/view/inputmethod/InputContentInfoCompat;ILandroid/os/Bundle;)Z
|
|
|
|
.locals 5
|
|
|
|
.param p0 # Landroid/view/inputmethod/InputConnection;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p1 # Landroid/view/inputmethod/EditorInfo;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p2 # Landroidx/core/view/inputmethod/InputContentInfoCompat;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p4 # Landroid/os/Bundle;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroidx/core/view/inputmethod/InputContentInfoCompat;->getDescription()Landroid/content/ClipDescription;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {p1}, Landroidx/core/view/inputmethod/EditorInfoCompat;->getContentMimeTypes(Landroid/view/inputmethod/EditorInfo;)[Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
array-length v1, p1
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-ge v3, v1, :cond_1
|
|
|
|
|
|
|
|
aget-object v4, p1, v3
|
|
|
|
|
|
|
|
invoke-virtual {v0, v4}, Landroid/content/ClipDescription;->hasMimeType(Ljava/lang/String;)Z
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
|
|
|
|
return v2
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
sget p1, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
|
|
|
|
const/16 v0, 0x19
|
|
|
|
|
|
|
|
if-lt p1, v0, :cond_3
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroidx/core/view/inputmethod/InputContentInfoCompat;->unwrap()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Landroid/view/inputmethod/InputContentInfo;
|
|
|
|
|
|
|
|
invoke-interface {p0, p1, p3, p4}, Landroid/view/inputmethod/InputConnection;->commitContent(Landroid/view/inputmethod/InputContentInfo;ILandroid/os/Bundle;)Z
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
return p0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
new-instance p1, Landroid/os/Bundle;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Landroid/os/Bundle;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroidx/core/view/inputmethod/InputContentInfoCompat;->getContentUri()Landroid/net/Uri;
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
const-string v1, "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_URI"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroidx/core/view/inputmethod/InputContentInfoCompat;->getDescription()Landroid/content/ClipDescription;
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
move-result-object v0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
const-string v1, "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_DESCRIPTION"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
invoke-virtual {p1, v1, v0}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {p2}, Landroidx/core/view/inputmethod/InputContentInfoCompat;->getLinkUri()Landroid/net/Uri;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
const-string v0, "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_LINK_URI"
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-virtual {p1, v0, p2}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V
|
|
|
|
|
|
|
|
const-string p2, "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_FLAGS"
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2, p3}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V
|
|
|
|
|
|
|
|
const-string p2, "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_OPTS"
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2, p4}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V
|
|
|
|
|
|
|
|
const-string p2, "androidx.core.view.inputmethod.InputConnectionCompat.COMMIT_CONTENT"
|
|
|
|
|
|
|
|
invoke-interface {p0, p2, p1}, Landroid/view/inputmethod/InputConnection;->performPrivateCommand(Ljava/lang/String;Landroid/os/Bundle;)Z
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
return p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static createWrapper(Landroid/view/inputmethod/InputConnection;Landroid/view/inputmethod/EditorInfo;Landroidx/core/view/inputmethod/InputConnectionCompat$OnCommitContentListener;)Landroid/view/inputmethod/InputConnection;
|
|
|
|
.locals 3
|
|
|
|
.param p0 # Landroid/view/inputmethod/InputConnection;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p1 # Landroid/view/inputmethod/EditorInfo;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p2 # Landroidx/core/view/inputmethod/InputConnectionCompat$OnCommitContentListener;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
if-eqz p0, :cond_4
|
|
|
|
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
|
|
|
|
const/16 v1, 0x19
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
|
|
|
|
new-instance p1, Landroidx/core/view/inputmethod/InputConnectionCompat$1;
|
|
|
|
|
|
|
|
invoke-direct {p1, p0, v2, p2}, Landroidx/core/view/inputmethod/InputConnectionCompat$1;-><init>(Landroid/view/inputmethod/InputConnection;ZLandroidx/core/view/inputmethod/InputConnectionCompat$OnCommitContentListener;)V
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-static {p1}, Landroidx/core/view/inputmethod/EditorInfoCompat;->getContentMimeTypes(Landroid/view/inputmethod/EditorInfo;)[Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
array-length p1, p1
|
|
|
|
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
new-instance p1, Landroidx/core/view/inputmethod/InputConnectionCompat$2;
|
|
|
|
|
|
|
|
invoke-direct {p1, p0, v2, p2}, Landroidx/core/view/inputmethod/InputConnectionCompat$2;-><init>(Landroid/view/inputmethod/InputConnection;ZLandroidx/core/view/inputmethod/InputConnectionCompat$OnCommitContentListener;)V
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string p1, "onCommitContentListener must be non-null"
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string p1, "editorInfo must be non-null"
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string p1, "inputConnection must be non-null"
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method static handlePerformPrivateCommand(Ljava/lang/String;Landroid/os/Bundle;Landroidx/core/view/inputmethod/InputConnectionCompat$OnCommitContentListener;)Z
|
|
|
|
.locals 7
|
|
|
|
.param p0 # Ljava/lang/String;
|
|
|
|
.annotation build Landroidx/annotation/Nullable;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p1 # Landroid/os/Bundle;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
.param p2 # Landroidx/core/view/inputmethod/InputConnectionCompat$OnCommitContentListener;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
const-string v0, "androidx.core.view.inputmethod.InputConnectionCompat.COMMIT_CONTENT"
|
|
|
|
|
|
|
|
invoke-static {v0, p0}, Landroid/text/TextUtils;->equals(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Z
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
|
|
|
|
return v0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
|
|
|
|
return v0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
const-string v1, "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_RESULT_RECEIVER"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v1}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Landroid/os/ResultReceiver;
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
|
|
|
|
:try_start_1
|
|
|
|
const-string v2, "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_URI"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v2}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Landroid/net/Uri;
|
|
|
|
|
|
|
|
const-string v3, "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_DESCRIPTION"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v3}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
check-cast v3, Landroid/content/ClipDescription;
|
|
|
|
|
|
|
|
const-string v4, "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_LINK_URI"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v4}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
check-cast v4, Landroid/net/Uri;
|
|
|
|
|
|
|
|
const-string v5, "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_FLAGS"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v5}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
const-string v6, "androidx.core.view.inputmethod.InputConnectionCompat.CONTENT_OPTS"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v6}, Landroid/os/Bundle;->getParcelable(Ljava/lang/String;)Landroid/os/Parcelable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Landroid/os/Bundle;
|
|
|
|
|
|
|
|
new-instance v6, Landroidx/core/view/inputmethod/InputContentInfoCompat;
|
|
|
|
|
|
|
|
invoke-direct {v6, v2, v3, v4}, Landroidx/core/view/inputmethod/InputContentInfoCompat;-><init>(Landroid/net/Uri;Landroid/content/ClipDescription;Landroid/net/Uri;)V
|
|
|
|
|
|
|
|
invoke-interface {p2, v6, v5, p1}, Landroidx/core/view/inputmethod/InputConnectionCompat$OnCommitContentListener;->onCommitContent(Landroidx/core/view/inputmethod/InputContentInfoCompat;ILandroid/os/Bundle;)Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {v1, p1, p0}, Landroid/os/ResultReceiver;->send(ILandroid/os/Bundle;)V
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
return p1
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:catchall_1
|
|
|
|
move-exception p1
|
|
|
|
|
|
|
|
move-object v1, p0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
|
|
|
|
invoke-virtual {v1, v0, p0}, Landroid/os/ResultReceiver;->send(ILandroid/os/Bundle;)V
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
throw p1
|
|
|
|
.end method
|