PipRoundVideoView.smali

.class public Lim/tpelyyftgw/ui/components/PipRoundVideoView;
.super Ljava/lang/Object;
.source "PipRoundVideoView.java"

# interfaces
.implements Lim/tpelyyftgw/messenger/NotificationCenter$NotificationCenterDelegate;


# static fields
.field private static instance:Lim/tpelyyftgw/ui/components/PipRoundVideoView;


# instance fields
.field private aspectRatioFrameLayout:Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;

.field private bitmap:Landroid/graphics/Bitmap;

.field private currentAccount:I

.field private decelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;

.field private hideShowAnimation:Landroid/animation/AnimatorSet;

.field private imageView:Landroid/widget/ImageView;

.field private onCloseRunnable:Ljava/lang/Runnable;

.field private parentActivity:Landroid/app/Activity;

.field private preferences:Landroid/content/SharedPreferences;

.field private rect:Landroid/graphics/RectF;

.field private textureView:Landroid/view/TextureView;

.field private videoHeight:I

.field private videoWidth:I

.field private windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

.field private windowManager:Landroid/view/WindowManager;

.field private windowView:Landroid/widget/FrameLayout;


# direct methods
.method static constructor <clinit>()V
    .registers 1

    return-void
.end method

.method public constructor <init>()V
    .registers 2

    .line 50
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 69
    new-instance v0, Landroid/graphics/RectF;

    invoke-direct {v0}, Landroid/graphics/RectF;-><init>()V

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->rect:Landroid/graphics/RectF;

    return-void
.end method

.method static synthetic access$000(Lim/tpelyyftgw/ui/components/PipRoundVideoView;)Landroid/view/WindowManager$LayoutParams;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PipRoundVideoView;

    .line 50
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    return-object v0
.end method

.method static synthetic access$100(Lim/tpelyyftgw/ui/components/PipRoundVideoView;)I
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PipRoundVideoView;

    .line 50
    iget v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->videoWidth:I

    return v0
.end method

.method static synthetic access$200(Lim/tpelyyftgw/ui/components/PipRoundVideoView;)Landroid/widget/FrameLayout;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PipRoundVideoView;

    .line 50
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    return-object v0
.end method

.method static synthetic access$300(Lim/tpelyyftgw/ui/components/PipRoundVideoView;)Landroid/view/WindowManager;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PipRoundVideoView;

    .line 50
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowManager:Landroid/view/WindowManager;

    return-object v0
.end method

.method static synthetic access$400(Lim/tpelyyftgw/ui/components/PipRoundVideoView;)V
    .registers 1
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PipRoundVideoView;

    .line 50
    invoke-direct {p0}, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->animateToBoundsMaybe()V

    return-void
.end method

.method static synthetic access$500(Lim/tpelyyftgw/ui/components/PipRoundVideoView;)Landroid/view/TextureView;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PipRoundVideoView;

    .line 50
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->textureView:Landroid/view/TextureView;

    return-object v0
.end method

.method static synthetic access$600(Lim/tpelyyftgw/ui/components/PipRoundVideoView;)Landroid/graphics/RectF;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PipRoundVideoView;

    .line 50
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->rect:Landroid/graphics/RectF;

    return-object v0
.end method

.method static synthetic access$700(Lim/tpelyyftgw/ui/components/PipRoundVideoView;)Landroid/animation/AnimatorSet;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PipRoundVideoView;

    .line 50
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->hideShowAnimation:Landroid/animation/AnimatorSet;

    return-object v0
.end method

.method static synthetic access$702(Lim/tpelyyftgw/ui/components/PipRoundVideoView;Landroid/animation/AnimatorSet;)Landroid/animation/AnimatorSet;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PipRoundVideoView;
    .param p1, "x1"    # Landroid/animation/AnimatorSet;

    .line 50
    iput-object p1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->hideShowAnimation:Landroid/animation/AnimatorSet;

    return-object p1
.end method

.method static synthetic access$800(Lim/tpelyyftgw/ui/components/PipRoundVideoView;)Ljava/lang/Runnable;
    .registers 2
    .param p0, "x0"    # Lim/tpelyyftgw/ui/components/PipRoundVideoView;

    .line 50
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->onCloseRunnable:Ljava/lang/Runnable;

    return-object v0
.end method

.method private animateToBoundsMaybe()V
    .registers 18

    .line 433
    move-object/from16 v0, p0

    iget v1, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->videoWidth:I

    const/4 v2, 0x0

    const/4 v3, 0x0

    const/4 v4, 0x1

    invoke-static {v4, v3, v2, v1}, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->getSideCoord(ZIFI)I

    move-result v1

    .line 434
    .local v1, "startX":I
    iget v5, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->videoWidth:I

    invoke-static {v4, v4, v2, v5}, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->getSideCoord(ZIFI)I

    move-result v5

    .line 435
    .local v5, "endX":I
    iget v6, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->videoHeight:I

    invoke-static {v3, v3, v2, v6}, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->getSideCoord(ZIFI)I

    move-result v6

    .line 436
    .local v6, "startY":I
    iget v7, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->videoHeight:I

    invoke-static {v3, v4, v2, v7}, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->getSideCoord(ZIFI)I

    move-result v7

    .line 437
    .local v7, "endY":I
    const/4 v8, 0x0

    .line 438
    .local v8, "animators":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Landroid/animation/Animator;>;"
    iget-object v9, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->preferences:Landroid/content/SharedPreferences;

    invoke-interface {v9}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v9

    .line 439
    .local v9, "editor":Landroid/content/SharedPreferences$Editor;
    const/high16 v10, 0x41a00000    # 20.0f

    invoke-static {v10}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v10

    .line 440
    .local v10, "maxDiff":I
    const/4 v11, 0x0

    .line 441
    .local v11, "slideOut":Z
    iget-object v12, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v12, v12, Landroid/view/WindowManager$LayoutParams;->x:I

    sub-int v12, v1, v12

    invoke-static {v12}, Ljava/lang/Math;->abs(I)I

    move-result v12

    const-string v14, "sidex"

    const-string v15, "x"

    const/high16 v16, 0x3f800000    # 1.0f

    if-le v12, v10, :cond_f8

    iget-object v12, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v12, v12, Landroid/view/WindowManager$LayoutParams;->x:I

    if-gez v12, :cond_50

    iget-object v12, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v12, v12, Landroid/view/WindowManager$LayoutParams;->x:I

    iget v2, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->videoWidth:I

    neg-int v2, v2

    div-int/lit8 v2, v2, 0x4

    if-le v12, v2, :cond_50

    goto/16 :goto_f8

    .line 450
    :cond_50
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v2, v2, Landroid/view/WindowManager$LayoutParams;->x:I

    sub-int v2, v5, v2

    invoke-static {v2}, Ljava/lang/Math;->abs(I)I

    move-result v2

    if-le v2, v10, :cond_c8

    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v2, v2, Landroid/view/WindowManager$LayoutParams;->x:I

    sget-object v12, Lim/tpelyyftgw/messenger/AndroidUtilities;->displaySize:Landroid/graphics/Point;

    iget v12, v12, Landroid/graphics/Point;->x:I

    iget v13, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->videoWidth:I

    sub-int/2addr v12, v13

    if-le v2, v12, :cond_7b

    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v2, v2, Landroid/view/WindowManager$LayoutParams;->x:I

    sget-object v12, Lim/tpelyyftgw/messenger/AndroidUtilities;->displaySize:Landroid/graphics/Point;

    iget v12, v12, Landroid/graphics/Point;->x:I

    iget v13, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->videoWidth:I

    div-int/lit8 v13, v13, 0x4

    mul-int/lit8 v13, v13, 0x3

    sub-int/2addr v12, v13

    if-ge v2, v12, :cond_7b

    goto :goto_c8

    .line 459
    :cond_7b
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    invoke-virtual {v2}, Landroid/widget/FrameLayout;->getAlpha()F

    move-result v2

    cmpl-float v2, v2, v16

    if-eqz v2, :cond_b4

    .line 460
    if-nez v8, :cond_8d

    .line 461
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    move-object v8, v2

    .line 463
    :cond_8d
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v2, v2, Landroid/view/WindowManager$LayoutParams;->x:I

    if-gez v2, :cond_a2

    .line 464
    new-array v2, v4, [I

    iget v12, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->videoWidth:I

    neg-int v12, v12

    aput v12, v2, v3

    invoke-static {v0, v15, v2}, Landroid/animation/ObjectAnimator;->ofInt(Ljava/lang/Object;Ljava/lang/String;[I)Landroid/animation/ObjectAnimator;

    move-result-object v2

    invoke-virtual {v8, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_b1

    .line 466
    :cond_a2
    new-array v2, v4, [I

    sget-object v12, Lim/tpelyyftgw/messenger/AndroidUtilities;->displaySize:Landroid/graphics/Point;

    iget v12, v12, Landroid/graphics/Point;->x:I

    aput v12, v2, v3

    invoke-static {v0, v15, v2}, Landroid/animation/ObjectAnimator;->ofInt(Ljava/lang/Object;Ljava/lang/String;[I)Landroid/animation/ObjectAnimator;

    move-result-object v2

    invoke-virtual {v8, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 468
    :goto_b1
    const/4 v11, 0x1

    goto/16 :goto_127

    .line 470
    :cond_b4
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v2, v2, Landroid/view/WindowManager$LayoutParams;->x:I

    sub-int/2addr v2, v1

    int-to-float v2, v2

    sub-int v12, v5, v1

    int-to-float v12, v12

    div-float/2addr v2, v12

    const-string v12, "px"

    invoke-interface {v9, v12, v2}, Landroid/content/SharedPreferences$Editor;->putFloat(Ljava/lang/String;F)Landroid/content/SharedPreferences$Editor;

    .line 471
    const/4 v2, 0x2

    invoke-interface {v9, v14, v2}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    goto :goto_127

    .line 451
    :cond_c8
    :goto_c8
    if-nez v8, :cond_d0

    .line 452
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    move-object v8, v2

    .line 454
    :cond_d0
    invoke-interface {v9, v14, v4}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    .line 455
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    invoke-virtual {v2}, Landroid/widget/FrameLayout;->getAlpha()F

    move-result v2

    cmpl-float v2, v2, v16

    if-eqz v2, :cond_ec

    .line 456
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    sget-object v12, Landroid/view/View;->ALPHA:Landroid/util/Property;

    new-array v13, v4, [F

    aput v16, v13, v3

    invoke-static {v2, v12, v13}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;

    move-result-object v2

    invoke-virtual {v8, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 458
    :cond_ec
    new-array v2, v4, [I

    aput v5, v2, v3

    invoke-static {v0, v15, v2}, Landroid/animation/ObjectAnimator;->ofInt(Ljava/lang/Object;Ljava/lang/String;[I)Landroid/animation/ObjectAnimator;

    move-result-object v2

    invoke-virtual {v8, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_127

    .line 442
    :cond_f8
    :goto_f8
    if-nez v8, :cond_100

    .line 443
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    move-object v8, v2

    .line 445
    :cond_100
    invoke-interface {v9, v14, v3}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    .line 446
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    invoke-virtual {v2}, Landroid/widget/FrameLayout;->getAlpha()F

    move-result v2

    cmpl-float v2, v2, v16

    if-eqz v2, :cond_11c

    .line 447
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    sget-object v12, Landroid/view/View;->ALPHA:Landroid/util/Property;

    new-array v13, v4, [F

    aput v16, v13, v3

    invoke-static {v2, v12, v13}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;

    move-result-object v2

    invoke-virtual {v8, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 449
    :cond_11c
    new-array v2, v4, [I

    aput v1, v2, v3

    invoke-static {v0, v15, v2}, Landroid/animation/ObjectAnimator;->ofInt(Ljava/lang/Object;Ljava/lang/String;[I)Landroid/animation/ObjectAnimator;

    move-result-object v2

    invoke-virtual {v8, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 473
    :goto_127
    if-nez v11, :cond_194

    .line 474
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v2, v2, Landroid/view/WindowManager$LayoutParams;->y:I

    sub-int v2, v6, v2

    invoke-static {v2}, Ljava/lang/Math;->abs(I)I

    move-result v2

    const-string v12, "y"

    const-string v13, "sidey"

    if-le v2, v10, :cond_17b

    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v2, v2, Landroid/view/WindowManager$LayoutParams;->y:I

    invoke-static {}, Lim/tpelyyftgw/ui/actionbar/ActionBar;->getCurrentActionBarHeight()I

    move-result v14

    if-gt v2, v14, :cond_144

    goto :goto_17b

    .line 480
    :cond_144
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v2, v2, Landroid/view/WindowManager$LayoutParams;->y:I

    sub-int v2, v7, v2

    invoke-static {v2}, Ljava/lang/Math;->abs(I)I

    move-result v2

    if-gt v2, v10, :cond_167

    .line 481
    if-nez v8, :cond_158

    .line 482
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    move-object v8, v2

    .line 484
    :cond_158
    invoke-interface {v9, v13, v4}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    .line 485
    new-array v2, v4, [I

    aput v7, v2, v3

    invoke-static {v0, v12, v2}, Landroid/animation/ObjectAnimator;->ofInt(Ljava/lang/Object;Ljava/lang/String;[I)Landroid/animation/ObjectAnimator;

    move-result-object v2

    invoke-virtual {v8, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_191

    .line 487
    :cond_167
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v2, v2, Landroid/view/WindowManager$LayoutParams;->y:I

    sub-int/2addr v2, v6

    int-to-float v2, v2

    sub-int v12, v7, v6

    int-to-float v12, v12

    div-float/2addr v2, v12

    const-string v12, "py"

    invoke-interface {v9, v12, v2}, Landroid/content/SharedPreferences$Editor;->putFloat(Ljava/lang/String;F)Landroid/content/SharedPreferences$Editor;

    .line 488
    const/4 v2, 0x2

    invoke-interface {v9, v13, v2}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    goto :goto_191

    .line 475
    :cond_17b
    :goto_17b
    if-nez v8, :cond_183

    .line 476
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    move-object v8, v2

    .line 478
    :cond_183
    invoke-interface {v9, v13, v3}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    .line 479
    new-array v2, v4, [I

    aput v6, v2, v3

    invoke-static {v0, v12, v2}, Landroid/animation/ObjectAnimator;->ofInt(Ljava/lang/Object;Ljava/lang/String;[I)Landroid/animation/ObjectAnimator;

    move-result-object v2

    invoke-virtual {v8, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 490
    :goto_191
    invoke-interface {v9}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 492
    :cond_194
    if-eqz v8, :cond_1d0

    .line 493
    iget-object v2, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->decelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;

    if-nez v2, :cond_1a1

    .line 494
    new-instance v2, Landroid/view/animation/DecelerateInterpolator;

    invoke-direct {v2}, Landroid/view/animation/DecelerateInterpolator;-><init>()V

    iput-object v2, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->decelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;

    .line 496
    :cond_1a1
    new-instance v2, Landroid/animation/AnimatorSet;

    invoke-direct {v2}, Landroid/animation/AnimatorSet;-><init>()V

    .line 497
    .local v2, "animatorSet":Landroid/animation/AnimatorSet;
    iget-object v12, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->decelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;

    invoke-virtual {v2, v12}, Landroid/animation/AnimatorSet;->setInterpolator(Landroid/animation/TimeInterpolator;)V

    .line 498
    const-wide/16 v12, 0x96

    invoke-virtual {v2, v12, v13}, Landroid/animation/AnimatorSet;->setDuration(J)Landroid/animation/AnimatorSet;

    .line 499
    if-eqz v11, :cond_1ca

    .line 500
    iget-object v12, v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    sget-object v13, Landroid/view/View;->ALPHA:Landroid/util/Property;

    new-array v4, v4, [F

    const/4 v14, 0x0

    aput v14, v4, v3

    invoke-static {v12, v13, v4}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;

    move-result-object v3

    invoke-virtual {v8, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 501
    new-instance v3, Lim/tpelyyftgw/ui/components/PipRoundVideoView$7;

    invoke-direct {v3, v0}, Lim/tpelyyftgw/ui/components/PipRoundVideoView$7;-><init>(Lim/tpelyyftgw/ui/components/PipRoundVideoView;)V

    invoke-virtual {v2, v3}, Landroid/animation/AnimatorSet;->addListener(Landroid/animation/Animator$AnimatorListener;)V

    .line 511
    :cond_1ca
    invoke-virtual {v2, v8}, Landroid/animation/AnimatorSet;->playTogether(Ljava/util/Collection;)V

    .line 512
    invoke-virtual {v2}, Landroid/animation/AnimatorSet;->start()V

    .line 514
    .end local v2    # "animatorSet":Landroid/animation/AnimatorSet;
    :cond_1d0
    return-void
.end method

.method public static getInstance()Lim/tpelyyftgw/ui/components/PipRoundVideoView;
    .registers 1

    .line 545
    sget-object v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->instance:Lim/tpelyyftgw/ui/components/PipRoundVideoView;

    return-object v0
.end method

.method private static getSideCoord(ZIFI)I
    .registers 7
    .param p0, "isX"    # Z
    .param p1, "side"    # I
    .param p2, "p"    # F
    .param p3, "sideSize"    # I

    .line 291
    if-eqz p0, :cond_8

    .line 292
    sget-object v0, Lim/tpelyyftgw/messenger/AndroidUtilities;->displaySize:Landroid/graphics/Point;

    iget v0, v0, Landroid/graphics/Point;->x:I

    sub-int/2addr v0, p3

    .local v0, "total":I
    goto :goto_12

    .line 294
    .end local v0    # "total":I
    :cond_8
    sget-object v0, Lim/tpelyyftgw/messenger/AndroidUtilities;->displaySize:Landroid/graphics/Point;

    iget v0, v0, Landroid/graphics/Point;->y:I

    sub-int/2addr v0, p3

    invoke-static {}, Lim/tpelyyftgw/ui/actionbar/ActionBar;->getCurrentActionBarHeight()I

    move-result v1

    sub-int/2addr v0, v1

    .line 297
    .restart local v0    # "total":I
    :goto_12
    const/high16 v1, 0x41200000    # 10.0f

    if-nez p1, :cond_1b

    .line 298
    invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v1

    .local v1, "result":I
    goto :goto_39

    .line 299
    .end local v1    # "result":I
    :cond_1b
    const/4 v2, 0x1

    if-ne p1, v2, :cond_25

    .line 300
    invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v1

    sub-int v1, v0, v1

    .restart local v1    # "result":I
    goto :goto_39

    .line 302
    .end local v1    # "result":I
    :cond_25
    const/high16 v2, 0x41a00000    # 20.0f

    invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v2

    sub-int v2, v0, v2

    int-to-float v2, v2

    mul-float v2, v2, p2

    invoke-static {v2}, Ljava/lang/Math;->round(F)I

    move-result v2

    invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v1

    add-int/2addr v1, v2

    .line 304
    .restart local v1    # "result":I
    :goto_39
    if-nez p0, :cond_40

    .line 305
    invoke-static {}, Lim/tpelyyftgw/ui/actionbar/ActionBar;->getCurrentActionBarHeight()I

    move-result v2

    add-int/2addr v1, v2

    .line 307
    :cond_40
    return v1
.end method

.method private runShowHideAnimation(Z)V
    .registers 12
    .param p1, "show"    # Z

    .line 398
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->hideShowAnimation:Landroid/animation/AnimatorSet;

    if-eqz v0, :cond_7

    .line 399
    invoke-virtual {v0}, Landroid/animation/AnimatorSet;->cancel()V

    .line 401
    :cond_7
    new-instance v0, Landroid/animation/AnimatorSet;

    invoke-direct {v0}, Landroid/animation/AnimatorSet;-><init>()V

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->hideShowAnimation:Landroid/animation/AnimatorSet;

    .line 402
    const/4 v1, 0x3

    new-array v1, v1, [Landroid/animation/Animator;

    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    sget-object v3, Landroid/view/View;->ALPHA:Landroid/util/Property;

    const/4 v4, 0x1

    new-array v5, v4, [F

    const/high16 v6, 0x3f800000    # 1.0f

    if-eqz p1, :cond_1f

    const/high16 v7, 0x3f800000    # 1.0f

    goto :goto_20

    :cond_1f
    const/4 v7, 0x0

    :goto_20
    const/4 v8, 0x0

    aput v7, v5, v8

    .line 403
    invoke-static {v2, v3, v5}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;

    move-result-object v2

    aput-object v2, v1, v8

    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    sget-object v3, Landroid/view/View;->SCALE_X:Landroid/util/Property;

    new-array v5, v4, [F

    const v7, 0x3f4ccccd    # 0.8f

    if-eqz p1, :cond_37

    const/high16 v9, 0x3f800000    # 1.0f

    goto :goto_3a

    :cond_37
    const v9, 0x3f4ccccd    # 0.8f

    :goto_3a
    aput v9, v5, v8

    .line 404
    invoke-static {v2, v3, v5}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;

    move-result-object v2

    aput-object v2, v1, v4

    const/4 v2, 0x2

    iget-object v3, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    sget-object v5, Landroid/view/View;->SCALE_Y:Landroid/util/Property;

    new-array v4, v4, [F

    if-eqz p1, :cond_4c

    goto :goto_4f

    :cond_4c
    const v6, 0x3f4ccccd    # 0.8f

    :goto_4f
    aput v6, v4, v8

    .line 405
    invoke-static {v3, v5, v4}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;

    move-result-object v3

    aput-object v3, v1, v2

    .line 402
    invoke-virtual {v0, v1}, Landroid/animation/AnimatorSet;->playTogether([Landroid/animation/Animator;)V

    .line 406
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->hideShowAnimation:Landroid/animation/AnimatorSet;

    const-wide/16 v1, 0x96

    invoke-virtual {v0, v1, v2}, Landroid/animation/AnimatorSet;->setDuration(J)Landroid/animation/AnimatorSet;

    .line 407
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->decelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;

    if-nez v0, :cond_6c

    .line 408
    new-instance v0, Landroid/view/animation/DecelerateInterpolator;

    invoke-direct {v0}, Landroid/view/animation/DecelerateInterpolator;-><init>()V

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->decelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;

    .line 410
    :cond_6c
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->hideShowAnimation:Landroid/animation/AnimatorSet;

    new-instance v1, Lim/tpelyyftgw/ui/components/PipRoundVideoView$6;

    invoke-direct {v1, p0, p1}, Lim/tpelyyftgw/ui/components/PipRoundVideoView$6;-><init>(Lim/tpelyyftgw/ui/components/PipRoundVideoView;Z)V

    invoke-virtual {v0, v1}, Landroid/animation/AnimatorSet;->addListener(Landroid/animation/Animator$AnimatorListener;)V

    .line 428
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->hideShowAnimation:Landroid/animation/AnimatorSet;

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->decelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;

    invoke-virtual {v0, v1}, Landroid/animation/AnimatorSet;->setInterpolator(Landroid/animation/TimeInterpolator;)V

    .line 429
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->hideShowAnimation:Landroid/animation/AnimatorSet;

    invoke-virtual {v0}, Landroid/animation/AnimatorSet;->start()V

    .line 430
    return-void
.end method


# virtual methods
.method public close(Z)V
    .registers 6
    .param p1, "animated"    # Z

    .line 324
    const/4 v0, 0x0

    if-eqz p1, :cond_56

    .line 325
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->textureView:Landroid/view/TextureView;

    if-eqz v1, :cond_82

    invoke-virtual {v1}, Landroid/view/TextureView;->getParent()Landroid/view/ViewParent;

    move-result-object v1

    if-eqz v1, :cond_82

    .line 326
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->textureView:Landroid/view/TextureView;

    invoke-virtual {v1}, Landroid/view/TextureView;->getWidth()I

    move-result v1

    if-lez v1, :cond_31

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->textureView:Landroid/view/TextureView;

    invoke-virtual {v1}, Landroid/view/TextureView;->getHeight()I

    move-result v1

    if-lez v1, :cond_31

    .line 327
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->textureView:Landroid/view/TextureView;

    invoke-virtual {v1}, Landroid/view/TextureView;->getWidth()I

    move-result v1

    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->textureView:Landroid/view/TextureView;

    invoke-virtual {v2}, Landroid/view/TextureView;->getHeight()I

    move-result v2

    sget-object v3, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    invoke-static {v1, v2, v3}, Lim/tpelyyftgw/messenger/Bitmaps;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;

    move-result-object v1

    iput-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->bitmap:Landroid/graphics/Bitmap;

    .line 330
    :cond_31
    :try_start_31
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->textureView:Landroid/view/TextureView;

    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->bitmap:Landroid/graphics/Bitmap;

    invoke-virtual {v1, v2}, Landroid/view/TextureView;->getBitmap(Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;
    :try_end_38
    .catchall {:try_start_31 .. :try_end_38} :catchall_39

    .line 333
    goto :goto_3c

    .line 331
    :catchall_39
    move-exception v1

    .line 332
    .local v1, "e":Ljava/lang/Throwable;
    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->bitmap:Landroid/graphics/Bitmap;

    .line 334
    .end local v1    # "e":Ljava/lang/Throwable;
    :goto_3c
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->imageView:Landroid/widget/ImageView;

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->bitmap:Landroid/graphics/Bitmap;

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V

    .line 336
    :try_start_43
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->aspectRatioFrameLayout:Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->textureView:Landroid/view/TextureView;

    invoke-virtual {v0, v1}, Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;->removeView(Landroid/view/View;)V
    :try_end_4a
    .catch Ljava/lang/Exception; {:try_start_43 .. :try_end_4a} :catch_4b

    .line 339
    goto :goto_4c

    .line 337
    :catch_4b
    move-exception v0

    .line 340
    :goto_4c
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->imageView:Landroid/widget/ImageView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 341
    invoke-direct {p0, v1}, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->runShowHideAnimation(Z)V

    goto :goto_82

    .line 344
    :cond_56
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->bitmap:Landroid/graphics/Bitmap;

    if-eqz v1, :cond_66

    .line 345
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->imageView:Landroid/widget/ImageView;

    invoke-virtual {v1, v0}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 346
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->bitmap:Landroid/graphics/Bitmap;

    invoke-virtual {v1}, Landroid/graphics/Bitmap;->recycle()V

    .line 347
    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->bitmap:Landroid/graphics/Bitmap;

    .line 350
    :cond_66
    :try_start_66
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowManager:Landroid/view/WindowManager;

    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    invoke-interface {v1, v2}, Landroid/view/WindowManager;->removeView(Landroid/view/View;)V
    :try_end_6d
    .catch Ljava/lang/Exception; {:try_start_66 .. :try_end_6d} :catch_6e

    .line 353
    goto :goto_6f

    .line 351
    :catch_6e
    move-exception v1

    .line 354
    :goto_6f
    sget-object v1, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->instance:Lim/tpelyyftgw/ui/components/PipRoundVideoView;

    if-ne v1, p0, :cond_75

    .line 355
    sput-object v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->instance:Lim/tpelyyftgw/ui/components/PipRoundVideoView;

    .line 357
    :cond_75
    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->parentActivity:Landroid/app/Activity;

    .line 358
    iget v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->currentAccount:I

    invoke-static {v0}, Lim/tpelyyftgw/messenger/NotificationCenter;->getInstance(I)Lim/tpelyyftgw/messenger/NotificationCenter;

    move-result-object v0

    sget v1, Lim/tpelyyftgw/messenger/NotificationCenter;->messagePlayingProgressDidChanged:I

    invoke-virtual {v0, p0, v1}, Lim/tpelyyftgw/messenger/NotificationCenter;->removeObserver(Ljava/lang/Object;I)V

    .line 360
    :cond_82
    :goto_82
    return-void
.end method

.method public varargs didReceivedNotification(II[Ljava/lang/Object;)V
    .registers 5
    .param p1, "id"    # I
    .param p2, "account"    # I
    .param p3, "args"    # [Ljava/lang/Object;

    .line 312
    sget v0, Lim/tpelyyftgw/messenger/NotificationCenter;->messagePlayingProgressDidChanged:I

    if-ne p1, v0, :cond_b

    .line 313
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->aspectRatioFrameLayout:Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;

    if-eqz v0, :cond_b

    .line 314
    invoke-virtual {v0}, Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;->invalidate()V

    .line 317
    :cond_b
    return-void
.end method

.method public getTextureView()Landroid/view/TextureView;
    .registers 2

    .line 320
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->textureView:Landroid/view/TextureView;

    return-object v0
.end method

.method public getX()I
    .registers 2

    .line 517
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v0, v0, Landroid/view/WindowManager$LayoutParams;->x:I

    return v0
.end method

.method public getY()I
    .registers 2

    .line 521
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v0, v0, Landroid/view/WindowManager$LayoutParams;->y:I

    return v0
.end method

.method public onConfigurationChanged()V
    .registers 9

    .line 363
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->preferences:Landroid/content/SharedPreferences;

    const/4 v1, 0x1

    const-string v2, "sidex"

    invoke-interface {v0, v2, v1}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v0

    .line 364
    .local v0, "sidex":I
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->preferences:Landroid/content/SharedPreferences;

    const/4 v3, 0x0

    const-string v4, "sidey"

    invoke-interface {v2, v4, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v2

    .line 365
    .local v2, "sidey":I
    iget-object v4, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->preferences:Landroid/content/SharedPreferences;

    const/4 v5, 0x0

    const-string v6, "px"

    invoke-interface {v4, v6, v5}, Landroid/content/SharedPreferences;->getFloat(Ljava/lang/String;F)F

    move-result v4

    .line 366
    .local v4, "px":F
    iget-object v6, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->preferences:Landroid/content/SharedPreferences;

    const-string v7, "py"

    invoke-interface {v6, v7, v5}, Landroid/content/SharedPreferences;->getFloat(Ljava/lang/String;F)F

    move-result v5

    .line 367
    .local v5, "py":F
    iget-object v6, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v7, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->videoWidth:I

    invoke-static {v1, v0, v4, v7}, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->getSideCoord(ZIFI)I

    move-result v1

    iput v1, v6, Landroid/view/WindowManager$LayoutParams;->x:I

    .line 368
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v6, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->videoHeight:I

    invoke-static {v3, v2, v5, v6}, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->getSideCoord(ZIFI)I

    move-result v3

    iput v3, v1, Landroid/view/WindowManager$LayoutParams;->y:I

    .line 369
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowManager:Landroid/view/WindowManager;

    iget-object v3, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    iget-object v6, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    invoke-interface {v1, v3, v6}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 370
    return-void
.end method

.method public setX(I)V
    .registers 5
    .param p1, "value"    # I

    .line 526
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iput p1, v0, Landroid/view/WindowManager$LayoutParams;->x:I

    .line 528
    :try_start_4
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowManager:Landroid/view/WindowManager;

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    invoke-interface {v0, v1, v2}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
    :try_end_d
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_d} :catch_e

    .line 531
    goto :goto_f

    .line 529
    :catch_e
    move-exception v0

    .line 532
    :goto_f
    return-void
.end method

.method public setY(I)V
    .registers 5
    .param p1, "value"    # I

    .line 536
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iput p1, v0, Landroid/view/WindowManager$LayoutParams;->y:I

    .line 538
    :try_start_4
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowManager:Landroid/view/WindowManager;

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    invoke-interface {v0, v1, v2}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
    :try_end_d
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_d} :catch_e

    .line 541
    goto :goto_f

    .line 539
    :catch_e
    move-exception v0

    .line 542
    :goto_f
    return-void
.end method

.method public show(Landroid/app/Activity;Ljava/lang/Runnable;)V
    .registers 15
    .param p1, "activity"    # Landroid/app/Activity;
    .param p2, "closeRunnable"    # Ljava/lang/Runnable;

    .line 75
    if-nez p1, :cond_3

    .line 76
    return-void

    .line 78
    :cond_3
    sput-object p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->instance:Lim/tpelyyftgw/ui/components/PipRoundVideoView;

    .line 79
    iput-object p2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->onCloseRunnable:Ljava/lang/Runnable;

    .line 80
    new-instance v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView$1;

    invoke-direct {v0, p0, p1}, Lim/tpelyyftgw/ui/components/PipRoundVideoView$1;-><init>(Lim/tpelyyftgw/ui/components/PipRoundVideoView;Landroid/content/Context;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    .line 176
    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/FrameLayout;->setWillNotDraw(Z)V

    .line 178
    const/high16 v0, 0x42fc0000    # 126.0f

    invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v2

    iput v2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->videoWidth:I

    .line 179
    invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I

    move-result v0

    iput v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->videoHeight:I

    .line 181
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v2, 0x15

    const/4 v3, 0x1

    if-lt v0, v2, :cond_3c

    .line 182
    new-instance v0, Lim/tpelyyftgw/ui/components/PipRoundVideoView$2;

    invoke-direct {v0, p0, p1}, Lim/tpelyyftgw/ui/components/PipRoundVideoView$2;-><init>(Lim/tpelyyftgw/ui/components/PipRoundVideoView;Landroid/content/Context;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->aspectRatioFrameLayout:Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;

    .line 196
    new-instance v2, Lim/tpelyyftgw/ui/components/PipRoundVideoView$3;

    invoke-direct {v2, p0}, Lim/tpelyyftgw/ui/components/PipRoundVideoView$3;-><init>(Lim/tpelyyftgw/ui/components/PipRoundVideoView;)V

    invoke-virtual {v0, v2}, Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;->setOutlineProvider(Landroid/view/ViewOutlineProvider;)V

    .line 203
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->aspectRatioFrameLayout:Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;

    invoke-virtual {v0, v3}, Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;->setClipToOutline(Z)V

    goto :goto_5c

    .line 205
    :cond_3c
    new-instance v0, Landroid/graphics/Paint;

    invoke-direct {v0, v3}, Landroid/graphics/Paint;-><init>(I)V

    .line 206
    .local v0, "aspectPaint":Landroid/graphics/Paint;
    const/high16 v2, -0x1000000

    invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setColor(I)V

    .line 207
    new-instance v2, Landroid/graphics/PorterDuffXfermode;

    sget-object v4, Landroid/graphics/PorterDuff$Mode;->CLEAR:Landroid/graphics/PorterDuff$Mode;

    invoke-direct {v2, v4}, Landroid/graphics/PorterDuffXfermode;-><init>(Landroid/graphics/PorterDuff$Mode;)V

    invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setXfermode(Landroid/graphics/Xfermode;)Landroid/graphics/Xfermode;

    .line 208
    new-instance v2, Lim/tpelyyftgw/ui/components/PipRoundVideoView$4;

    invoke-direct {v2, p0, p1, v0}, Lim/tpelyyftgw/ui/components/PipRoundVideoView$4;-><init>(Lim/tpelyyftgw/ui/components/PipRoundVideoView;Landroid/content/Context;Landroid/graphics/Paint;)V

    iput-object v2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->aspectRatioFrameLayout:Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;

    .line 244
    const/4 v4, 0x2

    const/4 v5, 0x0

    invoke-virtual {v2, v4, v5}, Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;->setLayerType(ILandroid/graphics/Paint;)V

    .line 246
    .end local v0    # "aspectPaint":Landroid/graphics/Paint;
    :goto_5c
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->aspectRatioFrameLayout:Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;

    const/high16 v2, 0x3f800000    # 1.0f

    invoke-virtual {v0, v2, v1}, Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;->setAspectRatio(FI)V

    .line 247
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    iget-object v4, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->aspectRatioFrameLayout:Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;

    const/high16 v5, 0x42f00000    # 120.0f

    const/high16 v6, 0x42f00000    # 120.0f

    const/16 v7, 0x33

    const/high16 v8, 0x40400000    # 3.0f

    const/high16 v9, 0x40400000    # 3.0f

    const/4 v10, 0x0

    const/4 v11, 0x0

    invoke-static/range {v5 .. v11}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(FFIFFFF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v5

    invoke-virtual {v0, v4, v5}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 248
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    invoke-virtual {v0, v2}, Landroid/widget/FrameLayout;->setAlpha(F)V

    .line 249
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    const v2, 0x3f4ccccd    # 0.8f

    invoke-virtual {v0, v2}, Landroid/widget/FrameLayout;->setScaleX(F)V

    .line 250
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    invoke-virtual {v0, v2}, Landroid/widget/FrameLayout;->setScaleY(F)V

    .line 252
    new-instance v0, Landroid/view/TextureView;

    invoke-direct {v0, p1}, Landroid/view/TextureView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->textureView:Landroid/view/TextureView;

    .line 253
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->aspectRatioFrameLayout:Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;

    const/high16 v4, -0x40800000    # -1.0f

    const/4 v5, -0x1

    invoke-static {v5, v4}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(IF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v6

    invoke-virtual {v2, v0, v6}, Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 255
    new-instance v0, Landroid/widget/ImageView;

    invoke-direct {v0, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->imageView:Landroid/widget/ImageView;

    .line 256
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->aspectRatioFrameLayout:Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;

    invoke-static {v5, v4}, Lim/tpelyyftgw/ui/components/LayoutHelper;->createFrame(IF)Landroid/widget/FrameLayout$LayoutParams;

    move-result-object v4

    invoke-virtual {v2, v0, v4}, Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 257
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->imageView:Landroid/widget/ImageView;

    const/4 v2, 0x4

    invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setVisibility(I)V

    .line 259
    const-string v0, "window"

    invoke-virtual {p1, v0}, Landroid/app/Activity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/WindowManager;

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowManager:Landroid/view/WindowManager;

    .line 261
    sget-object v0, Lim/tpelyyftgw/messenger/ApplicationLoader;->applicationContext:Landroid/content/Context;

    const-string v2, "pipconfig"

    invoke-virtual {v0, v2, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v0

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->preferences:Landroid/content/SharedPreferences;

    .line 263
    const-string v2, "sidex"

    invoke-interface {v0, v2, v3}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v0

    .line 264
    .local v0, "sidex":I
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->preferences:Landroid/content/SharedPreferences;

    const-string v4, "sidey"

    invoke-interface {v2, v4, v1}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v2

    .line 265
    .local v2, "sidey":I
    iget-object v4, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->preferences:Landroid/content/SharedPreferences;

    const/4 v5, 0x0

    const-string v6, "px"

    invoke-interface {v4, v6, v5}, Landroid/content/SharedPreferences;->getFloat(Ljava/lang/String;F)F

    move-result v4

    .line 266
    .local v4, "px":F
    iget-object v6, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->preferences:Landroid/content/SharedPreferences;

    const-string v7, "py"

    invoke-interface {v6, v7, v5}, Landroid/content/SharedPreferences;->getFloat(Ljava/lang/String;F)F

    move-result v5

    .line 269
    .local v5, "py":F
    :try_start_e8
    new-instance v6, Landroid/view/WindowManager$LayoutParams;

    invoke-direct {v6}, Landroid/view/WindowManager$LayoutParams;-><init>()V

    iput-object v6, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    .line 270
    iget v7, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->videoWidth:I

    iput v7, v6, Landroid/view/WindowManager$LayoutParams;->width:I

    .line 271
    iget-object v6, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v7, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->videoHeight:I

    iput v7, v6, Landroid/view/WindowManager$LayoutParams;->height:I

    .line 272
    iget-object v6, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v7, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->videoWidth:I

    invoke-static {v3, v0, v4, v7}, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->getSideCoord(ZIFI)I

    move-result v7

    iput v7, v6, Landroid/view/WindowManager$LayoutParams;->x:I

    .line 273
    iget-object v6, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    iget v7, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->videoHeight:I

    invoke-static {v1, v2, v5, v7}, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->getSideCoord(ZIFI)I

    move-result v1

    iput v1, v6, Landroid/view/WindowManager$LayoutParams;->y:I

    .line 274
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    const/4 v6, -0x3

    iput v6, v1, Landroid/view/WindowManager$LayoutParams;->format:I

    .line 275
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    const/16 v6, 0x33

    iput v6, v1, Landroid/view/WindowManager$LayoutParams;->gravity:I

    .line 276
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    const/16 v6, 0x63

    iput v6, v1, Landroid/view/WindowManager$LayoutParams;->type:I

    .line 277
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    const v6, 0x1000208

    iput v6, v1, Landroid/view/WindowManager$LayoutParams;->flags:I

    .line 278
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowManager:Landroid/view/WindowManager;

    iget-object v6, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    iget-object v7, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowLayoutParams:Landroid/view/WindowManager$LayoutParams;

    invoke-interface {v1, v6, v7}, Landroid/view/WindowManager;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
    :try_end_12e
    .catch Ljava/lang/Exception; {:try_start_e8 .. :try_end_12e} :catch_142

    .line 282
    nop

    .line 283
    iput-object p1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->parentActivity:Landroid/app/Activity;

    .line 284
    sget v1, Lim/tpelyyftgw/messenger/UserConfig;->selectedAccount:I

    iput v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->currentAccount:I

    .line 285
    invoke-static {v1}, Lim/tpelyyftgw/messenger/NotificationCenter;->getInstance(I)Lim/tpelyyftgw/messenger/NotificationCenter;

    move-result-object v1

    sget v6, Lim/tpelyyftgw/messenger/NotificationCenter;->messagePlayingProgressDidChanged:I

    invoke-virtual {v1, p0, v6}, Lim/tpelyyftgw/messenger/NotificationCenter;->addObserver(Ljava/lang/Object;I)V

    .line 286
    invoke-direct {p0, v3}, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->runShowHideAnimation(Z)V

    .line 287
    return-void

    .line 279
    :catch_142
    move-exception v1

    .line 280
    .local v1, "e":Ljava/lang/Exception;
    invoke-static {v1}, Lim/tpelyyftgw/messenger/FileLog;->e(Ljava/lang/Throwable;)V

    .line 281
    return-void
.end method

.method public showTemporary(Z)V
    .registers 12
    .param p1, "show"    # Z

    .line 373
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->hideShowAnimation:Landroid/animation/AnimatorSet;

    if-eqz v0, :cond_7

    .line 374
    invoke-virtual {v0}, Landroid/animation/AnimatorSet;->cancel()V

    .line 376
    :cond_7
    new-instance v0, Landroid/animation/AnimatorSet;

    invoke-direct {v0}, Landroid/animation/AnimatorSet;-><init>()V

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->hideShowAnimation:Landroid/animation/AnimatorSet;

    .line 377
    const/4 v1, 0x3

    new-array v1, v1, [Landroid/animation/Animator;

    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    sget-object v3, Landroid/view/View;->ALPHA:Landroid/util/Property;

    const/4 v4, 0x1

    new-array v5, v4, [F

    const/high16 v6, 0x3f800000    # 1.0f

    if-eqz p1, :cond_1f

    const/high16 v7, 0x3f800000    # 1.0f

    goto :goto_20

    :cond_1f
    const/4 v7, 0x0

    :goto_20
    const/4 v8, 0x0

    aput v7, v5, v8

    .line 378
    invoke-static {v2, v3, v5}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;

    move-result-object v2

    aput-object v2, v1, v8

    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    sget-object v3, Landroid/view/View;->SCALE_X:Landroid/util/Property;

    new-array v5, v4, [F

    const v7, 0x3f4ccccd    # 0.8f

    if-eqz p1, :cond_37

    const/high16 v9, 0x3f800000    # 1.0f

    goto :goto_3a

    :cond_37
    const v9, 0x3f4ccccd    # 0.8f

    :goto_3a
    aput v9, v5, v8

    .line 379
    invoke-static {v2, v3, v5}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;

    move-result-object v2

    aput-object v2, v1, v4

    const/4 v2, 0x2

    iget-object v3, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->windowView:Landroid/widget/FrameLayout;

    sget-object v5, Landroid/view/View;->SCALE_Y:Landroid/util/Property;

    new-array v4, v4, [F

    if-eqz p1, :cond_4c

    goto :goto_4f

    :cond_4c
    const v6, 0x3f4ccccd    # 0.8f

    :goto_4f
    aput v6, v4, v8

    .line 380
    invoke-static {v3, v5, v4}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Landroid/util/Property;[F)Landroid/animation/ObjectAnimator;

    move-result-object v3

    aput-object v3, v1, v2

    .line 377
    invoke-virtual {v0, v1}, Landroid/animation/AnimatorSet;->playTogether([Landroid/animation/Animator;)V

    .line 381
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->hideShowAnimation:Landroid/animation/AnimatorSet;

    const-wide/16 v1, 0x96

    invoke-virtual {v0, v1, v2}, Landroid/animation/AnimatorSet;->setDuration(J)Landroid/animation/AnimatorSet;

    .line 382
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->decelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;

    if-nez v0, :cond_6c

    .line 383
    new-instance v0, Landroid/view/animation/DecelerateInterpolator;

    invoke-direct {v0}, Landroid/view/animation/DecelerateInterpolator;-><init>()V

    iput-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->decelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;

    .line 385
    :cond_6c
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->hideShowAnimation:Landroid/animation/AnimatorSet;

    new-instance v1, Lim/tpelyyftgw/ui/components/PipRoundVideoView$5;

    invoke-direct {v1, p0}, Lim/tpelyyftgw/ui/components/PipRoundVideoView$5;-><init>(Lim/tpelyyftgw/ui/components/PipRoundVideoView;)V

    invoke-virtual {v0, v1}, Landroid/animation/AnimatorSet;->addListener(Landroid/animation/Animator$AnimatorListener;)V

    .line 393
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->hideShowAnimation:Landroid/animation/AnimatorSet;

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->decelerateInterpolator:Landroid/view/animation/DecelerateInterpolator;

    invoke-virtual {v0, v1}, Landroid/animation/AnimatorSet;->setInterpolator(Landroid/animation/TimeInterpolator;)V

    .line 394
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->hideShowAnimation:Landroid/animation/AnimatorSet;

    invoke-virtual {v0}, Landroid/animation/AnimatorSet;->start()V

    .line 395
    return-void
.end method