1059 lines
30 KiB
Smali
1059 lines
30 KiB
Smali
.class public final Lcom/discord/widgets/media/WidgetMedia;
|
|
.super Lcom/discord/app/AppFragment;
|
|
.source "WidgetMedia.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/media/WidgetMedia$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
.field public static final Companion:Lcom/discord/widgets/media/WidgetMedia$Companion;
|
|
|
|
.field public static final INTENT_HEIGHT:Ljava/lang/String; = "INTENT_MEDIA_HEIGHT"
|
|
|
|
.field public static final INTENT_PROXY_URL:Ljava/lang/String; = "INTENT_MEDIA_PROXY_URL"
|
|
|
|
.field public static final INTENT_TITLE:Ljava/lang/String; = "INTENT_TITLE"
|
|
|
|
.field public static final INTENT_URL:Ljava/lang/String; = "INTENT_MEDIA_URL"
|
|
|
|
.field public static final INTENT_VIDEO_URL:Ljava/lang/String; = "INTENT_VIDEO_URL"
|
|
|
|
.field public static final INTENT_WIDTH:Ljava/lang/String; = "INTENT_MEDIA_WIDTH"
|
|
|
|
|
|
# instance fields
|
|
.field public appMediaPlayer:Lcom/discord/player/AppMediaPlayer;
|
|
|
|
.field public final mediaImage$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final mediaLoadingIndicator$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public playerPausedByFragmentLifecycle:Z
|
|
|
|
.field public final playerView$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public proxyUri:Landroid/net/Uri;
|
|
|
|
.field public videoUrl:Ljava/lang/String;
|
|
|
|
.field public viewModel:Lcom/discord/widgets/media/WidgetMediaViewModel;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 6
|
|
|
|
const/4 v0, 0x3
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v1, Lz/u/b/u;
|
|
|
|
const-class v2, Lcom/discord/widgets/media/WidgetMedia;
|
|
|
|
invoke-static {v2}, Lz/u/b/x;->getOrCreateKotlinClass(Ljava/lang/Class;)Lz/y/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "mediaImage"
|
|
|
|
const-string v4, "getMediaImage()Lcom/facebook/samples/zoomable/ZoomableDraweeView;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Lz/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v2, Lz/u/b/x;->a:Lz/u/b/y;
|
|
|
|
invoke-virtual {v2, v1}, Lz/u/b/y;->property1(Lz/u/b/t;)Lz/y/d;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-instance v2, Lz/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/widgets/media/WidgetMedia;
|
|
|
|
invoke-static {v3}, Lz/u/b/x;->getOrCreateKotlinClass(Ljava/lang/Class;)Lz/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "playerView"
|
|
|
|
const-string v5, "getPlayerView()Lcom/google/android/exoplayer2/ui/PlayerView;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Lz/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Lz/u/b/x;->a:Lz/u/b/y;
|
|
|
|
invoke-virtual {v3, v2}, Lz/u/b/y;->property1(Lz/u/b/t;)Lz/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
const/4 v1, 0x2
|
|
|
|
new-instance v2, Lz/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/widgets/media/WidgetMedia;
|
|
|
|
invoke-static {v3}, Lz/u/b/x;->getOrCreateKotlinClass(Ljava/lang/Class;)Lz/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "mediaLoadingIndicator"
|
|
|
|
const-string v5, "getMediaLoadingIndicator()Landroid/view/View;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Lz/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Lz/u/b/x;->a:Lz/u/b/y;
|
|
|
|
invoke-virtual {v3, v2}, Lz/u/b/y;->property1(Lz/u/b/t;)Lz/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
sput-object v0, Lcom/discord/widgets/media/WidgetMedia;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v0, Lcom/discord/widgets/media/WidgetMedia$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/media/WidgetMedia$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/widgets/media/WidgetMedia;->Companion:Lcom/discord/widgets/media/WidgetMedia$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppFragment;-><init>()V
|
|
|
|
const v0, 0x7f0a04fb
|
|
|
|
invoke-static {p0, v0}, Lf/n/a/j/a;->b(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/media/WidgetMedia;->mediaImage$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a09fc
|
|
|
|
invoke-static {p0, v0}, Lf/n/a/j/a;->b(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/media/WidgetMedia;->playerView$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a09fb
|
|
|
|
invoke-static {p0, v0}, Lf/n/a/j/a;->b(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/media/WidgetMedia;->mediaLoadingIndicator$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getProxyUri$p(Lcom/discord/widgets/media/WidgetMedia;)Landroid/net/Uri;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/widgets/media/WidgetMedia;->proxyUri:Landroid/net/Uri;
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
const-string p0, "proxyUri"
|
|
|
|
invoke-static {p0}, Lz/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
const/4 p0, 0x0
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$handleImageProgressComplete(Lcom/discord/widgets/media/WidgetMedia;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/media/WidgetMedia;->handleImageProgressComplete()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$handlePlayerEvent(Lcom/discord/widgets/media/WidgetMedia;Lcom/discord/player/AppMediaPlayer$Event;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/media/WidgetMedia;->handlePlayerEvent(Lcom/discord/player/AppMediaPlayer$Event;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$setProxyUri$p(Lcom/discord/widgets/media/WidgetMedia;Landroid/net/Uri;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/media/WidgetMedia;->proxyUri:Landroid/net/Uri;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getFormattedUrl(Landroid/content/Context;Landroid/net/Uri;)Ljava/lang/String;
|
|
.locals 5
|
|
|
|
new-instance v0, Landroid/graphics/Rect;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const-string v3, "INTENT_MEDIA_WIDTH"
|
|
|
|
invoke-virtual {v1, v3, v2}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "INTENT_MEDIA_HEIGHT"
|
|
|
|
invoke-virtual {v3, v4, v2}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I
|
|
|
|
move-result v3
|
|
|
|
invoke-direct {v0, v2, v2, v1, v3}, Landroid/graphics/Rect;-><init>(IIII)V
|
|
|
|
invoke-static {p1, v0}, Lcom/discord/utilities/display/DisplayUtils;->resizeToFitScreen(Landroid/content/Context;Landroid/graphics/Rect;)Landroid/graphics/Rect;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p2}, Landroid/net/Uri;->getLastPathSegment()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v1, 0x2
|
|
|
|
const-string v3, ".gif"
|
|
|
|
invoke-static {v0, v3, v2, v1}, Lz/a0/p;->endsWith$default(Ljava/lang/String;Ljava/lang/String;ZI)Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
const-string v0, ""
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v0, "&format=webp"
|
|
|
|
:goto_0
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p2, "?width="
|
|
|
|
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Landroid/graphics/Rect;->width()I
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string p2, "&height="
|
|
|
|
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Landroid/graphics/Rect;->height()I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)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 p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private final getMediaImage()Lcom/facebook/samples/zoomable/ZoomableDraweeView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/media/WidgetMedia;->mediaImage$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/media/WidgetMedia;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/facebook/samples/zoomable/ZoomableDraweeView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getMediaLoadingIndicator()Landroid/view/View;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/media/WidgetMedia;->mediaLoadingIndicator$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/media/WidgetMedia;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x2
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/view/View;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getPlayerView()Lcom/google/android/exoplayer2/ui/PlayerView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/media/WidgetMedia;->playerView$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/media/WidgetMedia;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/google/android/exoplayer2/ui/PlayerView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final handleImageProgressComplete()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/media/WidgetMedia;->videoUrl:Ljava/lang/String;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/media/WidgetMedia;->hideLoadingIndicator()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handlePlayerEvent(Lcom/discord/player/AppMediaPlayer$Event;)V
|
|
.locals 4
|
|
|
|
sget-object v0, Lcom/discord/player/AppMediaPlayer$Event$b;->a:Lcom/discord/player/AppMediaPlayer$Event$b;
|
|
|
|
invoke-static {p1, v0}, Lz/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/media/WidgetMedia;->showLoadingIndicator()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
sget-object v0, Lcom/discord/player/AppMediaPlayer$Event$a;->a:Lcom/discord/player/AppMediaPlayer$Event$a;
|
|
|
|
invoke-static {p1, v0}, Lz/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const-string v3, "viewModel"
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/media/WidgetMedia;->getMediaImage()Lcom/facebook/samples/zoomable/ZoomableDraweeView;
|
|
|
|
move-result-object p1
|
|
|
|
const/16 v0, 0x8
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/media/WidgetMedia;->viewModel:Lcom/discord/widgets/media/WidgetMediaViewModel;
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-virtual {p1, v1}, Lcom/discord/widgets/media/WidgetMediaViewModel;->setShowCoverFrame(Z)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/media/WidgetMedia;->hideLoadingIndicator()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-static {v3}, Lz/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
|
|
:cond_2
|
|
instance-of v0, p1, Lcom/discord/player/AppMediaPlayer$Event$c;
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/media/WidgetMedia;->viewModel:Lcom/discord/widgets/media/WidgetMediaViewModel;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
check-cast p1, Lcom/discord/player/AppMediaPlayer$Event$c;
|
|
|
|
iget-wide v1, p1, Lcom/discord/player/AppMediaPlayer$Event$c;->a:J
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/discord/widgets/media/WidgetMediaViewModel;->setCurrentPlayerPositionMs(J)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
invoke-static {v3}, Lz/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
|
|
:cond_4
|
|
sget-object v0, Lcom/discord/player/AppMediaPlayer$Event$d;->a:Lcom/discord/player/AppMediaPlayer$Event$d;
|
|
|
|
invoke-static {p1, v0}, Lz/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
iget-boolean p1, p0, Lcom/discord/widgets/media/WidgetMedia;->playerPausedByFragmentLifecycle:Z
|
|
|
|
if-nez p1, :cond_8
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/media/WidgetMedia;->viewModel:Lcom/discord/widgets/media/WidgetMediaViewModel;
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
invoke-virtual {p1, v1}, Lcom/discord/widgets/media/WidgetMediaViewModel;->setPlaying(Z)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_5
|
|
invoke-static {v3}, Lz/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
|
|
:cond_6
|
|
sget-object v0, Lcom/discord/player/AppMediaPlayer$Event$e;->a:Lcom/discord/player/AppMediaPlayer$Event$e;
|
|
|
|
invoke-static {p1, v0}, Lz/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_8
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/media/WidgetMedia;->viewModel:Lcom/discord/widgets/media/WidgetMediaViewModel;
|
|
|
|
if-eqz p1, :cond_7
|
|
|
|
const/4 v0, 0x1
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/widgets/media/WidgetMediaViewModel;->setPlaying(Z)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_7
|
|
invoke-static {v3}, Lz/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
|
|
:cond_8
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final hideLoadingIndicator()V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/media/WidgetMedia;->getMediaLoadingIndicator()Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
const/16 v1, 0x8
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final launch(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Lcom/discord/models/domain/ModelMessageEmbed$Item;Lcom/discord/models/domain/ModelMessageEmbed$Item;)V
|
|
.locals 6
|
|
|
|
sget-object v0, Lcom/discord/widgets/media/WidgetMedia;->Companion:Lcom/discord/widgets/media/WidgetMedia$Companion;
|
|
|
|
move-object v1, p0
|
|
|
|
move-object v2, p1
|
|
|
|
move-object v3, p2
|
|
|
|
move-object v4, p3
|
|
|
|
move-object v5, p4
|
|
|
|
invoke-virtual/range {v0 .. v5}, Lcom/discord/widgets/media/WidgetMedia$Companion;->launch(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Lcom/discord/models/domain/ModelMessageEmbed$Item;Lcom/discord/models/domain/ModelMessageEmbed$Item;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final showLoadingIndicator()V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/media/WidgetMedia;->getMediaLoadingIndicator()Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getContentViewResId()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d01d9
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onDestroy()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/media/WidgetMedia;->appMediaPlayer:Lcom/discord/player/AppMediaPlayer;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/player/AppMediaPlayer;->f()V
|
|
|
|
invoke-super {p0}, Landroidx/fragment/app/Fragment;->onDestroy()V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string v0, "appMediaPlayer"
|
|
|
|
invoke-static {v0}, Lz/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public onPause()V
|
|
.locals 3
|
|
|
|
invoke-super {p0}, Lcom/discord/app/AppFragment;->onPause()V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/media/WidgetMedia;->appMediaPlayer:Lcom/discord/player/AppMediaPlayer;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const-string v2, "appMediaPlayer"
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {v0}, Lcom/discord/player/AppMediaPlayer;->a()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lcom/discord/widgets/media/WidgetMedia;->playerPausedByFragmentLifecycle:Z
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/media/WidgetMedia;->appMediaPlayer:Lcom/discord/player/AppMediaPlayer;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/player/AppMediaPlayer;->d()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-static {v2}, Lz/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_2
|
|
invoke-static {v2}, Lz/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public onViewBound(Landroid/view/View;)V
|
|
.locals 2
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/app/AppFragment;->onViewBound(Landroid/view/View;)V
|
|
|
|
invoke-static {p0}, Landroidx/lifecycle/ViewModelProviders;->of(Landroidx/fragment/app/Fragment;)Landroidx/lifecycle/ViewModelProvider;
|
|
|
|
move-result-object p1
|
|
|
|
const-class v0, Lcom/discord/widgets/media/WidgetMediaViewModel;
|
|
|
|
invoke-virtual {p1, v0}, Landroidx/lifecycle/ViewModelProvider;->get(Ljava/lang/Class;)Landroidx/lifecycle/ViewModel;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "ViewModelProviders\n \u2026diaViewModel::class.java)"
|
|
|
|
invoke-static {p1, v0}, Lz/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Lcom/discord/widgets/media/WidgetMediaViewModel;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/media/WidgetMedia;->viewModel:Lcom/discord/widgets/media/WidgetMediaViewModel;
|
|
|
|
sget-object p1, Lf/a/e/e;->a:Lf/a/e/e;
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "requireContext()"
|
|
|
|
invoke-static {v0, v1}, Lz/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1, v0}, Lf/a/e/e;->a(Landroid/content/Context;)Lcom/discord/player/AppMediaPlayer;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/media/WidgetMedia;->appMediaPlayer:Lcom/discord/player/AppMediaPlayer;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "view"
|
|
|
|
invoke-static {p1}, Lz/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public onViewBoundOrOnResume()V
|
|
.locals 23
|
|
|
|
move-object/from16 v6, p0
|
|
|
|
invoke-super/range {p0 .. p0}, Lcom/discord/app/AppFragment;->onViewBoundOrOnResume()V
|
|
|
|
iget-object v0, v6, Lcom/discord/widgets/media/WidgetMedia;->viewModel:Lcom/discord/widgets/media/WidgetMediaViewModel;
|
|
|
|
const-string v7, "viewModel"
|
|
|
|
const/4 v8, 0x0
|
|
|
|
if-eqz v0, :cond_b
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/media/WidgetMediaViewModel;->getShowCoverFrame()Z
|
|
|
|
move-result v0
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/media/WidgetMedia;->getMediaImage()Lcom/facebook/samples/zoomable/ZoomableDraweeView;
|
|
|
|
move-result-object v1
|
|
|
|
const/16 v2, 0x8
|
|
|
|
const/4 v9, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/16 v3, 0x8
|
|
|
|
:goto_0
|
|
invoke-virtual {v1, v3}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/media/WidgetMedia;->getMediaLoadingIndicator()Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:cond_1
|
|
invoke-virtual {v1, v2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/app/AppFragment;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "INTENT_MEDIA_URL"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
move-result-object v10
|
|
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/app/AppFragment;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "INTENT_MEDIA_PROXY_URL"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Uri.parse(mostRecentInte\u2026gExtra(INTENT_PROXY_URL))"
|
|
|
|
invoke-static {v0, v1}, Lz/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iput-object v0, v6, Lcom/discord/widgets/media/WidgetMedia;->proxyUri:Landroid/net/Uri;
|
|
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/app/AppFragment;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "INTENT_VIDEO_URL"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, v6, Lcom/discord/widgets/media/WidgetMedia;->videoUrl:Ljava/lang/String;
|
|
|
|
invoke-virtual/range {p0 .. p0}, Lcom/discord/app/AppFragment;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "INTENT_TITLE"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v11
|
|
|
|
const/4 v12, 0x1
|
|
|
|
if-eqz v11, :cond_3
|
|
|
|
invoke-static {v11}, Lz/a0/p;->isBlank(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
:goto_1
|
|
const/4 v0, 0x1
|
|
|
|
:goto_2
|
|
if-eqz v0, :cond_4
|
|
|
|
invoke-virtual {v10}, Landroid/net/Uri;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
move-object v13, v0
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
move-object v13, v11
|
|
|
|
:goto_3
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x7
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/app/AppFragment;->setActionBarDisplayHomeAsUpEnabled$default(Lcom/discord/app/AppFragment;ZLjava/lang/Integer;Ljava/lang/Integer;ILjava/lang/Object;)Landroidx/appcompat/widget/Toolbar;
|
|
|
|
const v0, 0x7f1215b7
|
|
|
|
invoke-virtual {v6, v0}, Lcom/discord/app/AppFragment;->setActionBarTitle(I)Lkotlin/Unit;
|
|
|
|
invoke-virtual {v6, v13}, Lcom/discord/app/AppFragment;->setActionBarSubtitle(Ljava/lang/CharSequence;)Lkotlin/Unit;
|
|
|
|
const v1, 0x7f0e0011
|
|
|
|
new-instance v2, Lcom/discord/widgets/media/WidgetMedia$onViewBoundOrOnResume$1;
|
|
|
|
invoke-direct {v2, v6, v10, v11, v13}, Lcom/discord/widgets/media/WidgetMedia$onViewBoundOrOnResume$1;-><init>(Lcom/discord/widgets/media/WidgetMedia;Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
const/4 v4, 0x4
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/app/AppFragment;->setActionBarOptionsMenu$default(Lcom/discord/app/AppFragment;ILrx/functions/Action2;Lrx/functions/Action1;ILjava/lang/Object;)Landroidx/appcompat/widget/Toolbar;
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/media/WidgetMedia;->getMediaImage()Lcom/facebook/samples/zoomable/ZoomableDraweeView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v9}, Lcom/facebook/samples/zoomable/ZoomableDraweeView;->setIsLongpressEnabled(Z)V
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/media/WidgetMedia;->getMediaImage()Lcom/facebook/samples/zoomable/ZoomableDraweeView;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lf/j/l/b/f;
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/media/WidgetMedia;->getMediaImage()Lcom/facebook/samples/zoomable/ZoomableDraweeView;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {v1, v2}, Lf/j/l/b/f;-><init>(Lcom/facebook/samples/zoomable/ZoomableDraweeView;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/facebook/samples/zoomable/ZoomableDraweeView;->setTapListener(Landroid/view/GestureDetector$SimpleOnGestureListener;)V
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/media/WidgetMedia;->getMediaImage()Lcom/facebook/samples/zoomable/ZoomableDraweeView;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/facebook/drawee/drawable/ScalingUtils$ScaleType;->c:Lcom/facebook/drawee/drawable/ScalingUtils$ScaleType;
|
|
|
|
const-string v2, "ScalingUtils.ScaleType.FIT_CENTER"
|
|
|
|
invoke-static {v1, v2}, Lz/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v0, v1}, Lcom/discord/utilities/images/MGImages;->setScaleType(Landroid/widget/ImageView;Lcom/facebook/drawee/drawable/ScalingUtils$ScaleType;)V
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/media/WidgetMedia;->getMediaImage()Lcom/facebook/samples/zoomable/ZoomableDraweeView;
|
|
|
|
move-result-object v13
|
|
|
|
new-array v14, v12, [Ljava/lang/String;
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/media/WidgetMedia;->getMediaImage()Lcom/facebook/samples/zoomable/ZoomableDraweeView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/widget/ImageView;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "mediaImage.context"
|
|
|
|
invoke-static {v0, v1}, Lz/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v1, v6, Lcom/discord/widgets/media/WidgetMedia;->proxyUri:Landroid/net/Uri;
|
|
|
|
if-eqz v1, :cond_a
|
|
|
|
invoke-direct {v6, v0, v1}, Lcom/discord/widgets/media/WidgetMedia;->getFormattedUrl(Landroid/content/Context;Landroid/net/Uri;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v14, v9
|
|
|
|
const/4 v15, 0x0
|
|
|
|
const/16 v16, 0x0
|
|
|
|
const/16 v17, 0x0
|
|
|
|
const/16 v18, 0x0
|
|
|
|
const/16 v19, 0x0
|
|
|
|
new-instance v0, Lcom/discord/widgets/media/WidgetMedia$onViewBoundOrOnResume$2;
|
|
|
|
invoke-direct {v0, v6}, Lcom/discord/widgets/media/WidgetMedia$onViewBoundOrOnResume$2;-><init>(Lcom/discord/widgets/media/WidgetMedia;)V
|
|
|
|
const/16 v21, 0x7c
|
|
|
|
const/16 v22, 0x0
|
|
|
|
move-object/from16 v20, v0
|
|
|
|
invoke-static/range {v13 .. v22}, Lcom/discord/utilities/images/MGImages;->setImage$default(Landroid/widget/ImageView;[Ljava/lang/String;IIZLkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;Lcom/facebook/drawee/controller/ControllerListener;ILjava/lang/Object;)V
|
|
|
|
iput-boolean v9, v6, Lcom/discord/widgets/media/WidgetMedia;->playerPausedByFragmentLifecycle:Z
|
|
|
|
iget-object v0, v6, Lcom/discord/widgets/media/WidgetMedia;->videoUrl:Ljava/lang/String;
|
|
|
|
if-eqz v0, :cond_9
|
|
|
|
iget-object v9, v6, Lcom/discord/widgets/media/WidgetMedia;->appMediaPlayer:Lcom/discord/player/AppMediaPlayer;
|
|
|
|
const-string v1, "appMediaPlayer"
|
|
|
|
if-eqz v9, :cond_8
|
|
|
|
invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;
|
|
|
|
move-result-object v10
|
|
|
|
const-string v0, "Uri.parse(videoUrl)"
|
|
|
|
invoke-static {v10, v0}, Lz/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, v6, Lcom/discord/widgets/media/WidgetMedia;->viewModel:Lcom/discord/widgets/media/WidgetMediaViewModel;
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/media/WidgetMediaViewModel;->isPlaying()Z
|
|
|
|
move-result v11
|
|
|
|
const/4 v12, 0x0
|
|
|
|
iget-object v0, v6, Lcom/discord/widgets/media/WidgetMedia;->viewModel:Lcom/discord/widgets/media/WidgetMediaViewModel;
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/media/WidgetMediaViewModel;->getCurrentPlayerPositionMs()J
|
|
|
|
move-result-wide v13
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/media/WidgetMedia;->getPlayerView()Lcom/google/android/exoplayer2/ui/PlayerView;
|
|
|
|
move-result-object v15
|
|
|
|
invoke-virtual/range {v9 .. v15}, Lcom/discord/player/AppMediaPlayer;->a(Landroid/net/Uri;ZZJLcom/google/android/exoplayer2/ui/PlayerView;)V
|
|
|
|
iget-object v0, v6, Lcom/discord/widgets/media/WidgetMedia;->appMediaPlayer:Lcom/discord/player/AppMediaPlayer;
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
invoke-virtual {v0}, Lcom/discord/player/AppMediaPlayer;->b()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, v6}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->bindToComponentLifecycle(Lrx/Observable;Lcom/discord/app/AppComponent;)Lrx/Observable;
|
|
|
|
move-result-object v7
|
|
|
|
const-class v8, Lcom/discord/widgets/media/WidgetMedia;
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
new-instance v13, Lcom/discord/widgets/media/WidgetMedia$onViewBoundOrOnResume$3;
|
|
|
|
invoke-direct {v13, v6}, Lcom/discord/widgets/media/WidgetMedia$onViewBoundOrOnResume$3;-><init>(Lcom/discord/widgets/media/WidgetMedia;)V
|
|
|
|
const/16 v14, 0x1e
|
|
|
|
const/4 v15, 0x0
|
|
|
|
invoke-static/range {v7 .. v15}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
goto :goto_4
|
|
|
|
:cond_5
|
|
invoke-static {v1}, Lz/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v8
|
|
|
|
:cond_6
|
|
invoke-static {v7}, Lz/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v8
|
|
|
|
:cond_7
|
|
invoke-static {v7}, Lz/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v8
|
|
|
|
:cond_8
|
|
invoke-static {v1}, Lz/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v8
|
|
|
|
:cond_9
|
|
:goto_4
|
|
return-void
|
|
|
|
:cond_a
|
|
const-string v0, "proxyUri"
|
|
|
|
invoke-static {v0}, Lz/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v8
|
|
|
|
:cond_b
|
|
invoke-static {v7}, Lz/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
throw v8
|
|
.end method
|