165 lines
4.5 KiB
Smali
165 lines
4.5 KiB
Smali
.class Landroidx/appcompat/widget/AppCompatReceiveContentHelper$1;
|
|
.super Ljava/lang/Object;
|
|
.source "AppCompatReceiveContentHelper.java"
|
|
|
|
# interfaces
|
|
.implements Landroidx/core/view/inputmethod/InputConnectionCompat$OnCommitContentListener;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Landroidx/appcompat/widget/AppCompatReceiveContentHelper;->createOnCommitContentListener(Landroid/view/View;)Landroidx/core/view/inputmethod/InputConnectionCompat$OnCommitContentListener;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x0
|
|
name = null
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field final synthetic val$view:Landroid/view/View;
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(Landroid/view/View;)V
|
|
.locals 0
|
|
|
|
.line 179
|
|
iput-object p1, p0, Landroidx/appcompat/widget/AppCompatReceiveContentHelper$1;->val$view:Landroid/view/View;
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onCommitContent(Landroidx/core/view/inputmethod/InputContentInfoCompat;ILandroid/os/Bundle;)Z
|
|
.locals 5
|
|
|
|
.line 184
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const/16 v3, 0x19
|
|
|
|
if-lt v0, v3, :cond_1
|
|
|
|
and-int/2addr p2, v2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 187
|
|
:try_start_0
|
|
invoke-virtual {p1}, Landroidx/core/view/inputmethod/InputContentInfoCompat;->requestPermission()V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
.line 199
|
|
invoke-virtual {p1}, Landroidx/core/view/inputmethod/InputContentInfoCompat;->unwrap()Ljava/lang/Object;
|
|
|
|
move-result-object p2
|
|
|
|
check-cast p2, Landroid/view/inputmethod/InputContentInfo;
|
|
|
|
if-nez p3, :cond_0
|
|
|
|
.line 200
|
|
new-instance p3, Landroid/os/Bundle;
|
|
|
|
invoke-direct {p3}, Landroid/os/Bundle;-><init>()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance v0, Landroid/os/Bundle;
|
|
|
|
invoke-direct {v0, p3}, Landroid/os/Bundle;-><init>(Landroid/os/Bundle;)V
|
|
|
|
move-object p3, v0
|
|
|
|
:goto_0
|
|
const-string v0, "androidx.core.view.extra.INPUT_CONTENT_INFO"
|
|
|
|
.line 201
|
|
invoke-virtual {p3, v0, p2}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
const-string p2, "ReceiveContent"
|
|
|
|
const-string p3, "Can\'t insert content from IME; requestPermission() failed"
|
|
|
|
.line 189
|
|
invoke-static {p2, p3, p1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
|
|
|
|
return v1
|
|
|
|
.line 203
|
|
:cond_1
|
|
:goto_1
|
|
new-instance p2, Landroid/content/ClipData;
|
|
|
|
invoke-virtual {p1}, Landroidx/core/view/inputmethod/InputContentInfoCompat;->getDescription()Landroid/content/ClipDescription;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v3, Landroid/content/ClipData$Item;
|
|
|
|
.line 204
|
|
invoke-virtual {p1}, Landroidx/core/view/inputmethod/InputContentInfoCompat;->getContentUri()Landroid/net/Uri;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-direct {v3, v4}, Landroid/content/ClipData$Item;-><init>(Landroid/net/Uri;)V
|
|
|
|
invoke-direct {p2, v0, v3}, Landroid/content/ClipData;-><init>(Landroid/content/ClipDescription;Landroid/content/ClipData$Item;)V
|
|
|
|
.line 205
|
|
new-instance v0, Landroidx/core/view/ContentInfoCompat$Builder;
|
|
|
|
const/4 v3, 0x2
|
|
|
|
invoke-direct {v0, p2, v3}, Landroidx/core/view/ContentInfoCompat$Builder;-><init>(Landroid/content/ClipData;I)V
|
|
|
|
.line 206
|
|
invoke-virtual {p1}, Landroidx/core/view/inputmethod/InputContentInfoCompat;->getLinkUri()Landroid/net/Uri;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/core/view/ContentInfoCompat$Builder;->setLinkUri(Landroid/net/Uri;)Landroidx/core/view/ContentInfoCompat$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
.line 207
|
|
invoke-virtual {p1, p3}, Landroidx/core/view/ContentInfoCompat$Builder;->setExtras(Landroid/os/Bundle;)Landroidx/core/view/ContentInfoCompat$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
.line 208
|
|
invoke-virtual {p1}, Landroidx/core/view/ContentInfoCompat$Builder;->build()Landroidx/core/view/ContentInfoCompat;
|
|
|
|
move-result-object p1
|
|
|
|
.line 209
|
|
iget-object p2, p0, Landroidx/appcompat/widget/AppCompatReceiveContentHelper$1;->val$view:Landroid/view/View;
|
|
|
|
invoke-static {p2, p1}, Landroidx/core/view/ViewCompat;->performReceiveContent(Landroid/view/View;Landroidx/core/view/ContentInfoCompat;)Landroidx/core/view/ContentInfoCompat;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
move v1, v2
|
|
|
|
:cond_2
|
|
return v1
|
|
.end method
|