167 lines
3.8 KiB
Smali
167 lines
3.8 KiB
Smali
.class public final Lcom/discord/app/AppFragment$c;
|
|
.super Ljava/lang/Object;
|
|
.source "AppFragment.kt"
|
|
|
|
# interfaces
|
|
.implements Lcom/miguelgaeta/media_picker/MediaPicker$OnResult;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/discord/app/AppFragment;->onActivityResult(IILandroid/content/Intent;)V
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = null
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final synthetic a:Lcom/discord/app/AppFragment;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/app/AppFragment;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()V"
|
|
}
|
|
.end annotation
|
|
|
|
iput-object p1, p0, Lcom/discord/app/AppFragment$c;->a:Lcom/discord/app/AppFragment;
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onCancelled()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onError(Ljava/io/IOException;)V
|
|
.locals 6
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/discord/app/AppFragment$c;->a:Lcom/discord/app/AppFragment;
|
|
|
|
invoke-virtual {v1}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lcom/discord/app/AppFragment$c;->a:Lcom/discord/app/AppFragment;
|
|
|
|
const v3, 0x7f1212b4
|
|
|
|
const/4 v4, 0x1
|
|
|
|
new-array v4, v4, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {p1}, Ljava/io/IOException;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v5, 0x0
|
|
|
|
aput-object p1, v4, v5
|
|
|
|
invoke-virtual {v2, v3, v4}, Landroidx/fragment/app/Fragment;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const/16 v2, 0xc
|
|
|
|
invoke-static {v1, p1, v5, v0, v2}, Le/a/b/j;->a(Landroid/content/Context;Ljava/lang/CharSequence;ILcom/discord/utilities/view/ToastManager;I)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "e"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public onSuccess(Landroid/net/Uri;Lcom/miguelgaeta/media_picker/RequestType;)V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
iget-object v1, p0, Lcom/discord/app/AppFragment$c;->a:Lcom/discord/app/AppFragment;
|
|
|
|
invoke-virtual {v1}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v1, v0
|
|
|
|
:goto_0
|
|
const/4 v2, 0x4
|
|
|
|
invoke-static {v1, p1, v0, v2, v0}, Lcom/discord/utilities/attachments/AttachmentUtilsKt;->getMimeType$default(Landroid/content/ContentResolver;Landroid/net/Uri;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Le/a/b/e;->a:[I
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result p2
|
|
|
|
aget p2, v1, p2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eq p2, v1, :cond_1
|
|
|
|
iget-object p2, p0, Lcom/discord/app/AppFragment$c;->a:Lcom/discord/app/AppFragment;
|
|
|
|
invoke-virtual {p2, p1, v0}, Lcom/discord/app/AppFragment;->onImageChosen(Landroid/net/Uri;Ljava/lang/String;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object p2, p0, Lcom/discord/app/AppFragment$c;->a:Lcom/discord/app/AppFragment;
|
|
|
|
invoke-virtual {p2, p1, v0}, Lcom/discord/app/AppFragment;->onImageCropped(Landroid/net/Uri;Ljava/lang/String;)V
|
|
|
|
:goto_1
|
|
return-void
|
|
|
|
:cond_2
|
|
const-string p1, "request"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
const-string p1, "uri"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|