187 lines
4.8 KiB
Smali
187 lines
4.8 KiB
Smali
.class public final Lcom/discord/widgets/media/WidgetMedia$Companion;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetMedia.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/media/WidgetMedia;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Companion"
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/media/WidgetMedia$Companion;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final launch(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Lcom/discord/models/domain/ModelMessageEmbed;)V
|
|
.locals 4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
if-eqz p4, :cond_5
|
|
|
|
invoke-virtual {p4}, Lcom/discord/models/domain/ModelMessageEmbed;->getImage()Lcom/discord/models/domain/ModelMessageEmbed$Item;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p4}, Lcom/discord/models/domain/ModelMessageEmbed;->getVideo()Lcom/discord/models/domain/ModelMessageEmbed$Item;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelMessageEmbed$Item;->getProxyUrl()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelMessageEmbed$Item;->getUrl()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move-object v3, v0
|
|
|
|
:goto_0
|
|
if-eqz v3, :cond_2
|
|
|
|
const-string v0, "javaClass"
|
|
|
|
invoke-static {p4, v3, v0}, Ld0/a/b/b/a;->t(Lcom/discord/models/domain/ModelMessageEmbed;Ljava/lang/String;Ljava/lang/String;)Lcom/discord/player/MediaSource;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_2
|
|
new-instance p4, Landroid/content/Intent;
|
|
|
|
invoke-direct {p4}, Landroid/content/Intent;-><init>()V
|
|
|
|
const-string v2, "INTENT_TITLE"
|
|
|
|
invoke-virtual {p4, v2, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p4, "image"
|
|
|
|
if-eqz p3, :cond_3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
invoke-static {v1, p4}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelMessageEmbed$Item;->getUrl()Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
:goto_1
|
|
const-string v2, "INTENT_MEDIA_URL"
|
|
|
|
invoke-virtual {p2, v2, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {v1, p4}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelMessageEmbed$Item;->getProxyUrl()Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
if-eqz p3, :cond_4
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelMessageEmbed$Item;->getUrl()Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
:goto_2
|
|
const-string p4, "INTENT_IMAGE_URL"
|
|
|
|
invoke-virtual {p2, p4, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelMessageEmbed$Item;->getWidth()I
|
|
|
|
move-result p3
|
|
|
|
const-string p4, "INTENT_MEDIA_WIDTH"
|
|
|
|
invoke-virtual {p2, p4, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelMessageEmbed$Item;->getHeight()I
|
|
|
|
move-result p3
|
|
|
|
const-string p4, "INTENT_MEDIA_HEIGHT"
|
|
|
|
invoke-virtual {p2, p4, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "INTENT_MEDIA_SOURCE"
|
|
|
|
invoke-virtual {p2, p3, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
|
|
|
|
move-result-object p2
|
|
|
|
const-string p3, "Intent()\n .putE\u2026EDIA_SOURCE, mediaSource)"
|
|
|
|
invoke-static {p2, p3}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-class p3, Lcom/discord/widgets/media/WidgetMedia;
|
|
|
|
invoke-static {p1, p3, p2}, Lf/a/b/l;->e(Landroid/content/Context;Ljava/lang/Class;Landroid/content/Intent;)V
|
|
|
|
return-void
|
|
|
|
:cond_5
|
|
const-string p1, "embed"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_6
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|