- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
1454 lines
40 KiB
Smali
1454 lines
40 KiB
Smali
.class public Landroidx/core/content/IntentSanitizer;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Landroidx/core/content/IntentSanitizer$Api29Impl;,
|
|
Landroidx/core/content/IntentSanitizer$Api31Impl;,
|
|
Landroidx/core/content/IntentSanitizer$Builder;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final TAG:Ljava/lang/String; = "IntentSanitizer"
|
|
|
|
|
|
# instance fields
|
|
.field private mAllowAnyComponent:Z
|
|
|
|
.field private mAllowClipDataText:Z
|
|
|
|
.field private mAllowIdentifier:Z
|
|
|
|
.field private mAllowSelector:Z
|
|
|
|
.field private mAllowSourceBounds:Z
|
|
|
|
.field private mAllowedActions:Landroidx/core/util/Predicate;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroidx/core/util/Predicate<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private mAllowedCategories:Landroidx/core/util/Predicate;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroidx/core/util/Predicate<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private mAllowedClipData:Landroidx/core/util/Predicate;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroidx/core/util/Predicate<",
|
|
"Landroid/content/ClipData;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private mAllowedClipDataUri:Landroidx/core/util/Predicate;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroidx/core/util/Predicate<",
|
|
"Landroid/net/Uri;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private mAllowedComponents:Landroidx/core/util/Predicate;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroidx/core/util/Predicate<",
|
|
"Landroid/content/ComponentName;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private mAllowedData:Landroidx/core/util/Predicate;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroidx/core/util/Predicate<",
|
|
"Landroid/net/Uri;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private mAllowedExtras:Ljava/util/Map;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"Landroidx/core/util/Predicate<",
|
|
"Ljava/lang/Object;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private mAllowedFlags:I
|
|
|
|
.field private mAllowedPackages:Landroidx/core/util/Predicate;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroidx/core/util/Predicate<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private mAllowedTypes:Landroidx/core/util/Predicate;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroidx/core/util/Predicate<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public static synthetic $r8$lambda$NofwxHOZrEEV1MRTpUn9ROuxIY8(Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
.line 0
|
|
invoke-static {p0}, Landroidx/core/content/IntentSanitizer;->lambda$sanitizeByThrowing$1(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic $r8$lambda$cs9npxBvv_qtzxpDgSnPy7MmurY(Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
.line 0
|
|
invoke-static {p0}, Landroidx/core/content/IntentSanitizer;->lambda$sanitizeByFiltering$0(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 81
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Landroidx/core/content/IntentSanitizer$1;)V
|
|
.locals 0
|
|
|
|
.line 62
|
|
invoke-direct {p0}, Landroidx/core/content/IntentSanitizer;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic access$1002(Landroidx/core/content/IntentSanitizer;Z)Z
|
|
.locals 0
|
|
|
|
.line 62
|
|
iput-boolean p1, p0, Landroidx/core/content/IntentSanitizer;->mAllowClipDataText:Z
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public static synthetic access$102(Landroidx/core/content/IntentSanitizer;I)I
|
|
.locals 0
|
|
|
|
.line 62
|
|
iput p1, p0, Landroidx/core/content/IntentSanitizer;->mAllowedFlags:I
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public static synthetic access$1102(Landroidx/core/content/IntentSanitizer;Landroidx/core/util/Predicate;)Landroidx/core/util/Predicate;
|
|
.locals 0
|
|
|
|
.line 62
|
|
iput-object p1, p0, Landroidx/core/content/IntentSanitizer;->mAllowedClipDataUri:Landroidx/core/util/Predicate;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static synthetic access$1202(Landroidx/core/content/IntentSanitizer;Landroidx/core/util/Predicate;)Landroidx/core/util/Predicate;
|
|
.locals 0
|
|
|
|
.line 62
|
|
iput-object p1, p0, Landroidx/core/content/IntentSanitizer;->mAllowedClipData:Landroidx/core/util/Predicate;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static synthetic access$1302(Landroidx/core/content/IntentSanitizer;Z)Z
|
|
.locals 0
|
|
|
|
.line 62
|
|
iput-boolean p1, p0, Landroidx/core/content/IntentSanitizer;->mAllowIdentifier:Z
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public static synthetic access$1402(Landroidx/core/content/IntentSanitizer;Z)Z
|
|
.locals 0
|
|
|
|
.line 62
|
|
iput-boolean p1, p0, Landroidx/core/content/IntentSanitizer;->mAllowSelector:Z
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public static synthetic access$1502(Landroidx/core/content/IntentSanitizer;Z)Z
|
|
.locals 0
|
|
|
|
.line 62
|
|
iput-boolean p1, p0, Landroidx/core/content/IntentSanitizer;->mAllowSourceBounds:Z
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public static synthetic access$202(Landroidx/core/content/IntentSanitizer;Landroidx/core/util/Predicate;)Landroidx/core/util/Predicate;
|
|
.locals 0
|
|
|
|
.line 62
|
|
iput-object p1, p0, Landroidx/core/content/IntentSanitizer;->mAllowedActions:Landroidx/core/util/Predicate;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static synthetic access$302(Landroidx/core/content/IntentSanitizer;Landroidx/core/util/Predicate;)Landroidx/core/util/Predicate;
|
|
.locals 0
|
|
|
|
.line 62
|
|
iput-object p1, p0, Landroidx/core/content/IntentSanitizer;->mAllowedData:Landroidx/core/util/Predicate;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static synthetic access$402(Landroidx/core/content/IntentSanitizer;Landroidx/core/util/Predicate;)Landroidx/core/util/Predicate;
|
|
.locals 0
|
|
|
|
.line 62
|
|
iput-object p1, p0, Landroidx/core/content/IntentSanitizer;->mAllowedTypes:Landroidx/core/util/Predicate;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static synthetic access$502(Landroidx/core/content/IntentSanitizer;Landroidx/core/util/Predicate;)Landroidx/core/util/Predicate;
|
|
.locals 0
|
|
|
|
.line 62
|
|
iput-object p1, p0, Landroidx/core/content/IntentSanitizer;->mAllowedCategories:Landroidx/core/util/Predicate;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static synthetic access$602(Landroidx/core/content/IntentSanitizer;Landroidx/core/util/Predicate;)Landroidx/core/util/Predicate;
|
|
.locals 0
|
|
|
|
.line 62
|
|
iput-object p1, p0, Landroidx/core/content/IntentSanitizer;->mAllowedPackages:Landroidx/core/util/Predicate;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static synthetic access$702(Landroidx/core/content/IntentSanitizer;Z)Z
|
|
.locals 0
|
|
|
|
.line 62
|
|
iput-boolean p1, p0, Landroidx/core/content/IntentSanitizer;->mAllowAnyComponent:Z
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public static synthetic access$802(Landroidx/core/content/IntentSanitizer;Landroidx/core/util/Predicate;)Landroidx/core/util/Predicate;
|
|
.locals 0
|
|
|
|
.line 62
|
|
iput-object p1, p0, Landroidx/core/content/IntentSanitizer;->mAllowedComponents:Landroidx/core/util/Predicate;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static synthetic access$902(Landroidx/core/content/IntentSanitizer;Ljava/util/Map;)Ljava/util/Map;
|
|
.locals 0
|
|
|
|
.line 62
|
|
iput-object p1, p0, Landroidx/core/content/IntentSanitizer;->mAllowedExtras:Ljava/util/Map;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private static checkOtherMembers(ILandroid/content/ClipData$Item;Landroidx/core/util/Consumer;)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(I",
|
|
"Landroid/content/ClipData$Item;",
|
|
"Landroidx/core/util/Consumer<",
|
|
"Ljava/lang/String;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 941
|
|
invoke-virtual {p1}, Landroid/content/ClipData$Item;->getHtmlText()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-virtual {p1}, Landroid/content/ClipData$Item;->getIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 942
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "ClipData item at position "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string p0, " contains htmlText, textLinks or intent: "
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-interface {p2, p0}, Landroidx/core/util/Consumer;->accept(Ljava/lang/Object;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private static synthetic lambda$sanitizeByFiltering$0(Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private static synthetic lambda$sanitizeByThrowing$1(Ljava/lang/String;)V
|
|
.locals 1
|
|
|
|
.line 106
|
|
new-instance v0, Ljava/lang/SecurityException;
|
|
|
|
invoke-direct {v0, p0}, Ljava/lang/SecurityException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method private putExtra(Landroid/content/Intent;Ljava/lang/String;Ljava/lang/Object;)V
|
|
.locals 1
|
|
|
|
if-nez p3, :cond_0
|
|
|
|
.line 237
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 p3, 0x0
|
|
|
|
invoke-virtual {p1, p2, p3}, Landroid/os/BaseBundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 238
|
|
:cond_0
|
|
instance-of v0, p3, Landroid/os/Parcelable;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 239
|
|
check-cast p3, Landroid/os/Parcelable;
|
|
|
|
invoke-virtual {p1, p2, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
|
|
|
|
goto :goto_0
|
|
|
|
.line 240
|
|
:cond_1
|
|
instance-of v0, p3, [Landroid/os/Parcelable;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 241
|
|
check-cast p3, [Landroid/os/Parcelable;
|
|
|
|
invoke-virtual {p1, p2, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;[Landroid/os/Parcelable;)Landroid/content/Intent;
|
|
|
|
goto :goto_0
|
|
|
|
.line 242
|
|
:cond_2
|
|
instance-of v0, p3, Ljava/io/Serializable;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 243
|
|
check-cast p3, Ljava/io/Serializable;
|
|
|
|
invoke-virtual {p1, p2, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;
|
|
|
|
:goto_0
|
|
return-void
|
|
|
|
.line 245
|
|
:cond_3
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v0, "Unsupported type "
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public static sanitizeClipData(Landroid/content/Intent;Landroid/content/Intent;Landroidx/core/util/Predicate;ZLandroidx/core/util/Predicate;Landroidx/core/util/Consumer;)V
|
|
.locals 7
|
|
.param p0 # Landroid/content/Intent;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/content/Intent;",
|
|
"Landroid/content/Intent;",
|
|
"Landroidx/core/util/Predicate<",
|
|
"Landroid/content/ClipData;",
|
|
">;Z",
|
|
"Landroidx/core/util/Predicate<",
|
|
"Landroid/net/Uri;",
|
|
">;",
|
|
"Landroidx/core/util/Consumer<",
|
|
"Ljava/lang/String;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 881
|
|
invoke-virtual {p0}, Landroid/content/Intent;->getClipData()Landroid/content/ClipData;
|
|
|
|
move-result-object p0
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 886
|
|
invoke-interface {p2, p0}, Landroidx/core/util/Predicate;->test(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 887
|
|
invoke-virtual {p1, p0}, Landroid/content/Intent;->setClipData(Landroid/content/ClipData;)V
|
|
|
|
goto/16 :goto_7
|
|
|
|
:cond_1
|
|
const/4 p2, 0x0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
move-object v1, p2
|
|
|
|
.line 889
|
|
:goto_0
|
|
invoke-virtual {p0}, Landroid/content/ClipData;->getItemCount()I
|
|
|
|
move-result v2
|
|
|
|
if-ge v0, v2, :cond_c
|
|
|
|
.line 890
|
|
invoke-virtual {p0, v0}, Landroid/content/ClipData;->getItemAt(I)Landroid/content/ClipData$Item;
|
|
|
|
move-result-object v2
|
|
|
|
sget v3, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v4, 0x1f
|
|
|
|
if-lt v3, v4, :cond_2
|
|
|
|
.line 892
|
|
invoke-static {v0, v2, p5}, Landroidx/core/content/IntentSanitizer$Api31Impl;->checkOtherMembers(ILandroid/content/ClipData$Item;Landroidx/core/util/Consumer;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 894
|
|
:cond_2
|
|
invoke-static {v0, v2, p5}, Landroidx/core/content/IntentSanitizer;->checkOtherMembers(ILandroid/content/ClipData$Item;Landroidx/core/util/Consumer;)V
|
|
|
|
:goto_1
|
|
if-eqz p3, :cond_3
|
|
|
|
.line 899
|
|
invoke-virtual {v2}, Landroid/content/ClipData$Item;->getText()Ljava/lang/CharSequence;
|
|
|
|
move-result-object v3
|
|
|
|
goto :goto_2
|
|
|
|
.line 901
|
|
:cond_3
|
|
invoke-virtual {v2}, Landroid/content/ClipData$Item;->getText()Ljava/lang/CharSequence;
|
|
|
|
move-result-object v3
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
.line 902
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v4, "Item text cannot contain value. Item position: "
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string v4, ". Text: "
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 904
|
|
invoke-virtual {v2}, Landroid/content/ClipData$Item;->getText()Ljava/lang/CharSequence;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
.line 902
|
|
invoke-interface {p5, v3}, Landroidx/core/util/Consumer;->accept(Ljava/lang/Object;)V
|
|
|
|
:cond_4
|
|
move-object v3, p2
|
|
|
|
:goto_2
|
|
const-string v4, ". URI: "
|
|
|
|
const-string v5, "Item URI is not allowed. Item position: "
|
|
|
|
if-nez p4, :cond_5
|
|
|
|
.line 910
|
|
invoke-virtual {v2}, Landroid/content/ClipData$Item;->getUri()Landroid/net/Uri;
|
|
|
|
move-result-object v6
|
|
|
|
if-eqz v6, :cond_7
|
|
|
|
.line 911
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v6, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 913
|
|
invoke-virtual {v2}, Landroid/content/ClipData$Item;->getUri()Landroid/net/Uri;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v6, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
.line 911
|
|
invoke-interface {p5, v2}, Landroidx/core/util/Consumer;->accept(Ljava/lang/Object;)V
|
|
|
|
goto :goto_3
|
|
|
|
.line 916
|
|
:cond_5
|
|
invoke-virtual {v2}, Landroid/content/ClipData$Item;->getUri()Landroid/net/Uri;
|
|
|
|
move-result-object v6
|
|
|
|
if-eqz v6, :cond_8
|
|
|
|
invoke-virtual {v2}, Landroid/content/ClipData$Item;->getUri()Landroid/net/Uri;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {p4, v6}, Landroidx/core/util/Predicate;->test(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_6
|
|
|
|
goto :goto_4
|
|
|
|
.line 919
|
|
:cond_6
|
|
new-instance v6, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v6, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 921
|
|
invoke-virtual {v2}, Landroid/content/ClipData$Item;->getUri()Landroid/net/Uri;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v6, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
.line 919
|
|
invoke-interface {p5, v2}, Landroidx/core/util/Consumer;->accept(Ljava/lang/Object;)V
|
|
|
|
:cond_7
|
|
:goto_3
|
|
move-object v2, p2
|
|
|
|
goto :goto_5
|
|
|
|
.line 917
|
|
:cond_8
|
|
:goto_4
|
|
invoke-virtual {v2}, Landroid/content/ClipData$Item;->getUri()Landroid/net/Uri;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_5
|
|
if-nez v3, :cond_9
|
|
|
|
if-eqz v2, :cond_b
|
|
|
|
:cond_9
|
|
if-nez v1, :cond_a
|
|
|
|
.line 927
|
|
new-instance v1, Landroid/content/ClipData;
|
|
|
|
invoke-virtual {p0}, Landroid/content/ClipData;->getDescription()Landroid/content/ClipDescription;
|
|
|
|
move-result-object v4
|
|
|
|
new-instance v5, Landroid/content/ClipData$Item;
|
|
|
|
invoke-direct {v5, v3, p2, v2}, Landroid/content/ClipData$Item;-><init>(Ljava/lang/CharSequence;Landroid/content/Intent;Landroid/net/Uri;)V
|
|
|
|
invoke-direct {v1, v4, v5}, Landroid/content/ClipData;-><init>(Landroid/content/ClipDescription;Landroid/content/ClipData$Item;)V
|
|
|
|
goto :goto_6
|
|
|
|
.line 930
|
|
:cond_a
|
|
new-instance v4, Landroid/content/ClipData$Item;
|
|
|
|
invoke-direct {v4, v3, p2, v2}, Landroid/content/ClipData$Item;-><init>(Ljava/lang/CharSequence;Landroid/content/Intent;Landroid/net/Uri;)V
|
|
|
|
invoke-virtual {v1, v4}, Landroid/content/ClipData;->addItem(Landroid/content/ClipData$Item;)V
|
|
|
|
:cond_b
|
|
:goto_6
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto/16 :goto_0
|
|
|
|
:cond_c
|
|
if-eqz v1, :cond_d
|
|
|
|
.line 935
|
|
invoke-virtual {p1, v1}, Landroid/content/Intent;->setClipData(Landroid/content/ClipData;)V
|
|
|
|
:cond_d
|
|
:goto_7
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public sanitize(Landroid/content/Intent;Landroidx/core/util/Consumer;)Landroid/content/Intent;
|
|
.locals 7
|
|
.param p1 # Landroid/content/Intent;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Landroidx/core/util/Consumer;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/content/Intent;",
|
|
"Landroidx/core/util/Consumer<",
|
|
"Ljava/lang/String;",
|
|
">;)",
|
|
"Landroid/content/Intent;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 122
|
|
new-instance v6, Landroid/content/Intent;
|
|
|
|
invoke-direct {v6}, Landroid/content/Intent;-><init>()V
|
|
|
|
.line 124
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getComponent()Landroid/content/ComponentName;
|
|
|
|
move-result-object v0
|
|
|
|
iget-boolean v1, p0, Landroidx/core/content/IntentSanitizer;->mAllowAnyComponent:Z
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
:cond_0
|
|
iget-object v1, p0, Landroidx/core/content/IntentSanitizer;->mAllowedComponents:Landroidx/core/util/Predicate;
|
|
|
|
.line 126
|
|
invoke-interface {v1, v0}, Landroidx/core/util/Predicate;->test(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
.line 127
|
|
:cond_1
|
|
invoke-virtual {v6, v0}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
|
|
|
|
goto :goto_0
|
|
|
|
.line 129
|
|
:cond_2
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Component is not allowed: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2, v0}, Landroidx/core/util/Consumer;->accept(Ljava/lang/Object;)V
|
|
|
|
.line 130
|
|
new-instance v0, Landroid/content/ComponentName;
|
|
|
|
const-string v1, "android"
|
|
|
|
const-string v2, "java.lang.Void"
|
|
|
|
invoke-direct {v0, v1, v2}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v6, v0}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
|
|
|
|
.line 133
|
|
:goto_0
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getPackage()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
iget-object v1, p0, Landroidx/core/content/IntentSanitizer;->mAllowedPackages:Landroidx/core/util/Predicate;
|
|
|
|
.line 134
|
|
invoke-interface {v1, v0}, Landroidx/core/util/Predicate;->test(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
goto :goto_1
|
|
|
|
.line 137
|
|
:cond_3
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Package is not allowed: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2, v0}, Landroidx/core/util/Consumer;->accept(Ljava/lang/Object;)V
|
|
|
|
goto :goto_2
|
|
|
|
.line 135
|
|
:cond_4
|
|
:goto_1
|
|
invoke-virtual {v6, v0}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
:goto_2
|
|
iget v0, p0, Landroidx/core/content/IntentSanitizer;->mAllowedFlags:I
|
|
|
|
.line 140
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getFlags()I
|
|
|
|
move-result v1
|
|
|
|
or-int/2addr v0, v1
|
|
|
|
iget v1, p0, Landroidx/core/content/IntentSanitizer;->mAllowedFlags:I
|
|
|
|
if-ne v0, v1, :cond_5
|
|
|
|
.line 141
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getFlags()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {v6, v0}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
|
|
|
|
goto :goto_3
|
|
|
|
.line 143
|
|
:cond_5
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getFlags()I
|
|
|
|
move-result v0
|
|
|
|
and-int/2addr v0, v1
|
|
|
|
invoke-virtual {v6, v0}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
|
|
|
|
.line 144
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "The intent contains flags that are not allowed: 0x"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 145
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getFlags()I
|
|
|
|
move-result v1
|
|
|
|
iget v2, p0, Landroidx/core/content/IntentSanitizer;->mAllowedFlags:I
|
|
|
|
not-int v2, v2
|
|
|
|
and-int/2addr v1, v2
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 144
|
|
invoke-interface {p2, v0}, Landroidx/core/util/Consumer;->accept(Ljava/lang/Object;)V
|
|
|
|
.line 148
|
|
:goto_3
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getAction()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
iget-object v1, p0, Landroidx/core/content/IntentSanitizer;->mAllowedActions:Landroidx/core/util/Predicate;
|
|
|
|
.line 149
|
|
invoke-interface {v1, v0}, Landroidx/core/util/Predicate;->test(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
goto :goto_4
|
|
|
|
.line 152
|
|
:cond_6
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Action is not allowed: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2, v0}, Landroidx/core/util/Consumer;->accept(Ljava/lang/Object;)V
|
|
|
|
goto :goto_5
|
|
|
|
.line 150
|
|
:cond_7
|
|
:goto_4
|
|
invoke-virtual {v6, v0}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 155
|
|
:goto_5
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getData()Landroid/net/Uri;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_9
|
|
|
|
iget-object v1, p0, Landroidx/core/content/IntentSanitizer;->mAllowedData:Landroidx/core/util/Predicate;
|
|
|
|
.line 156
|
|
invoke-interface {v1, v0}, Landroidx/core/util/Predicate;->test(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_8
|
|
|
|
goto :goto_6
|
|
|
|
.line 159
|
|
:cond_8
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Data is not allowed: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2, v0}, Landroidx/core/util/Consumer;->accept(Ljava/lang/Object;)V
|
|
|
|
goto :goto_7
|
|
|
|
.line 157
|
|
:cond_9
|
|
:goto_6
|
|
invoke-virtual {v6, v0}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;
|
|
|
|
.line 162
|
|
:goto_7
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getType()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_b
|
|
|
|
iget-object v1, p0, Landroidx/core/content/IntentSanitizer;->mAllowedTypes:Landroidx/core/util/Predicate;
|
|
|
|
.line 163
|
|
invoke-interface {v1, v0}, Landroidx/core/util/Predicate;->test(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_a
|
|
|
|
goto :goto_8
|
|
|
|
.line 166
|
|
:cond_a
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "Type is not allowed: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2, v0}, Landroidx/core/util/Consumer;->accept(Ljava/lang/Object;)V
|
|
|
|
goto :goto_9
|
|
|
|
.line 164
|
|
:cond_b
|
|
:goto_8
|
|
invoke-virtual {v6}, Landroid/content/Intent;->getData()Landroid/net/Uri;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v6, v1, v0}, Landroid/content/Intent;->setDataAndType(Landroid/net/Uri;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
.line 169
|
|
:goto_9
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getCategories()Ljava/util/Set;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_d
|
|
|
|
.line 171
|
|
invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_a
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_d
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/String;
|
|
|
|
iget-object v2, p0, Landroidx/core/content/IntentSanitizer;->mAllowedCategories:Landroidx/core/util/Predicate;
|
|
|
|
.line 172
|
|
invoke-interface {v2, v1}, Landroidx/core/util/Predicate;->test(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_c
|
|
|
|
.line 173
|
|
invoke-virtual {v6, v1}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
goto :goto_a
|
|
|
|
.line 175
|
|
:cond_c
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "Category is not allowed: "
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {p2, v1}, Landroidx/core/util/Consumer;->accept(Ljava/lang/Object;)V
|
|
|
|
goto :goto_a
|
|
|
|
.line 180
|
|
:cond_d
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_11
|
|
|
|
.line 182
|
|
invoke-virtual {v0}, Landroid/os/BaseBundle;->keySet()Ljava/util/Set;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_b
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_11
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/String;
|
|
|
|
const-string v3, "android.intent.extra.STREAM"
|
|
|
|
.line 183
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_e
|
|
|
|
iget v3, p0, Landroidx/core/content/IntentSanitizer;->mAllowedFlags:I
|
|
|
|
and-int/lit8 v3, v3, 0x1
|
|
|
|
if-nez v3, :cond_e
|
|
|
|
const-string v2, "Allowing Extra Stream requires also allowing at least FLAG_GRANT_READ_URI_PERMISSION Flag."
|
|
|
|
.line 185
|
|
invoke-interface {p2, v2}, Landroidx/core/util/Consumer;->accept(Ljava/lang/Object;)V
|
|
|
|
goto :goto_b
|
|
|
|
:cond_e
|
|
const-string v3, "output"
|
|
|
|
.line 190
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_f
|
|
|
|
iget v3, p0, Landroidx/core/content/IntentSanitizer;->mAllowedFlags:I
|
|
|
|
not-int v3, v3
|
|
|
|
and-int/lit8 v3, v3, 0x3
|
|
|
|
if-eqz v3, :cond_f
|
|
|
|
const-string v2, "Allowing Extra Output requires also allowing FLAG_GRANT_READ_URI_PERMISSION and FLAG_GRANT_WRITE_URI_PERMISSION Flags."
|
|
|
|
.line 194
|
|
invoke-interface {p2, v2}, Landroidx/core/util/Consumer;->accept(Ljava/lang/Object;)V
|
|
|
|
goto :goto_b
|
|
|
|
.line 199
|
|
:cond_f
|
|
invoke-virtual {v0, v2}, Landroid/os/BaseBundle;->get(Ljava/lang/String;)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object v4, p0, Landroidx/core/content/IntentSanitizer;->mAllowedExtras:Ljava/util/Map;
|
|
|
|
.line 200
|
|
invoke-interface {v4, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Landroidx/core/util/Predicate;
|
|
|
|
if-eqz v4, :cond_10
|
|
|
|
.line 201
|
|
invoke-interface {v4, v3}, Landroidx/core/util/Predicate;->test(Ljava/lang/Object;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_10
|
|
|
|
.line 202
|
|
invoke-direct {p0, v6, v2, v3}, Landroidx/core/content/IntentSanitizer;->putExtra(Landroid/content/Intent;Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
goto :goto_b
|
|
|
|
.line 204
|
|
:cond_10
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v5, "Extra is not allowed. Key: "
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, ". Value: "
|
|
|
|
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {p2, v2}, Landroidx/core/util/Consumer;->accept(Ljava/lang/Object;)V
|
|
|
|
goto :goto_b
|
|
|
|
:cond_11
|
|
iget-object v2, p0, Landroidx/core/content/IntentSanitizer;->mAllowedClipData:Landroidx/core/util/Predicate;
|
|
|
|
iget-boolean v3, p0, Landroidx/core/content/IntentSanitizer;->mAllowClipDataText:Z
|
|
|
|
iget-object v4, p0, Landroidx/core/content/IntentSanitizer;->mAllowedClipDataUri:Landroidx/core/util/Predicate;
|
|
|
|
move-object v0, p1
|
|
|
|
move-object v1, v6
|
|
|
|
move-object v5, p2
|
|
|
|
.line 209
|
|
invoke-static/range {v0 .. v5}, Landroidx/core/content/IntentSanitizer;->sanitizeClipData(Landroid/content/Intent;Landroid/content/Intent;Landroidx/core/util/Predicate;ZLandroidx/core/util/Predicate;Landroidx/core/util/Consumer;)V
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x1d
|
|
|
|
if-lt v0, v1, :cond_13
|
|
|
|
iget-boolean v0, p0, Landroidx/core/content/IntentSanitizer;->mAllowIdentifier:Z
|
|
|
|
if-eqz v0, :cond_12
|
|
|
|
.line 214
|
|
invoke-static {p1}, Landroidx/core/content/IntentSanitizer$Api29Impl;->getIdentifier(Landroid/content/Intent;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v6, v0}, Landroidx/core/content/IntentSanitizer$Api29Impl;->setIdentifier(Landroid/content/Intent;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
goto :goto_c
|
|
|
|
.line 215
|
|
:cond_12
|
|
invoke-static {p1}, Landroidx/core/content/IntentSanitizer$Api29Impl;->getIdentifier(Landroid/content/Intent;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_13
|
|
|
|
.line 216
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "Identifier is not allowed: "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-static {p1}, Landroidx/core/content/IntentSanitizer$Api29Impl;->getIdentifier(Landroid/content/Intent;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2, v0}, Landroidx/core/util/Consumer;->accept(Ljava/lang/Object;)V
|
|
|
|
:cond_13
|
|
:goto_c
|
|
iget-boolean v0, p0, Landroidx/core/content/IntentSanitizer;->mAllowSelector:Z
|
|
|
|
if-eqz v0, :cond_14
|
|
|
|
.line 221
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getSelector()Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v6, v0}, Landroid/content/Intent;->setSelector(Landroid/content/Intent;)V
|
|
|
|
goto :goto_d
|
|
|
|
.line 222
|
|
:cond_14
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getSelector()Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_15
|
|
|
|
.line 223
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "Selector is not allowed: "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getSelector()Landroid/content/Intent;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2, v0}, Landroidx/core/util/Consumer;->accept(Ljava/lang/Object;)V
|
|
|
|
:cond_15
|
|
:goto_d
|
|
iget-boolean v0, p0, Landroidx/core/content/IntentSanitizer;->mAllowSourceBounds:Z
|
|
|
|
if-eqz v0, :cond_16
|
|
|
|
.line 227
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getSourceBounds()Landroid/graphics/Rect;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v6, p1}, Landroid/content/Intent;->setSourceBounds(Landroid/graphics/Rect;)V
|
|
|
|
goto :goto_e
|
|
|
|
.line 228
|
|
:cond_16
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getSourceBounds()Landroid/graphics/Rect;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_17
|
|
|
|
.line 229
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "SourceBounds is not allowed: "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Landroid/content/Intent;->getSourceBounds()Landroid/graphics/Rect;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p2, p1}, Landroidx/core/util/Consumer;->accept(Ljava/lang/Object;)V
|
|
|
|
:cond_17
|
|
:goto_e
|
|
return-object v6
|
|
.end method
|
|
|
|
.method public sanitizeByFiltering(Landroid/content/Intent;)Landroid/content/Intent;
|
|
.locals 1
|
|
.param p1 # Landroid/content/Intent;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.line 92
|
|
new-instance v0, Landroidx/core/content/IntentSanitizer$$ExternalSyntheticLambda0;
|
|
|
|
invoke-direct {v0}, Landroidx/core/content/IntentSanitizer$$ExternalSyntheticLambda0;-><init>()V
|
|
|
|
invoke-virtual {p0, p1, v0}, Landroidx/core/content/IntentSanitizer;->sanitize(Landroid/content/Intent;Landroidx/core/util/Consumer;)Landroid/content/Intent;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public sanitizeByThrowing(Landroid/content/Intent;)Landroid/content/Intent;
|
|
.locals 1
|
|
.param p1 # Landroid/content/Intent;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.line 105
|
|
new-instance v0, Landroidx/core/content/IntentSanitizer$$ExternalSyntheticLambda1;
|
|
|
|
invoke-direct {v0}, Landroidx/core/content/IntentSanitizer$$ExternalSyntheticLambda1;-><init>()V
|
|
|
|
invoke-virtual {p0, p1, v0}, Landroidx/core/content/IntentSanitizer;->sanitize(Landroid/content/Intent;Landroidx/core/util/Consumer;)Landroid/content/Intent;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|