PipRoundVideoView$4.smali

.class Lim/tpelyyftgw/ui/components/PipRoundVideoView$4;
.super Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;
.source "PipRoundVideoView.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lim/tpelyyftgw/ui/components/PipRoundVideoView;->show(Landroid/app/Activity;Ljava/lang/Runnable;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field private aspectPath:Landroid/graphics/Path;

.field final synthetic this$0:Lim/tpelyyftgw/ui/components/PipRoundVideoView;

.field final synthetic val$aspectPaint:Landroid/graphics/Paint;


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

    return-void
.end method

.method constructor <init>(Lim/tpelyyftgw/ui/components/PipRoundVideoView;Landroid/content/Context;Landroid/graphics/Paint;)V
    .registers 4
    .param p1, "this$0"    # Lim/tpelyyftgw/ui/components/PipRoundVideoView;
    .param p2, "context"    # Landroid/content/Context;

    .line 208
    iput-object p1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView$4;->this$0:Lim/tpelyyftgw/ui/components/PipRoundVideoView;

    iput-object p3, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView$4;->val$aspectPaint:Landroid/graphics/Paint;

    invoke-direct {p0, p2}, Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;-><init>(Landroid/content/Context;)V

    .line 210
    new-instance p3, Landroid/graphics/Path;

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

    iput-object p3, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView$4;->aspectPath:Landroid/graphics/Path;

    return-void
.end method


# virtual methods
.method protected dispatchDraw(Landroid/graphics/Canvas;)V
    .registers 4
    .param p1, "canvas"    # Landroid/graphics/Canvas;

    .line 222
    invoke-super {p0, p1}, Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;->dispatchDraw(Landroid/graphics/Canvas;)V

    .line 223
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView$4;->aspectPath:Landroid/graphics/Path;

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView$4;->val$aspectPaint:Landroid/graphics/Paint;

    invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawPath(Landroid/graphics/Path;Landroid/graphics/Paint;)V

    .line 224
    return-void
.end method

.method protected drawChild(Landroid/graphics/Canvas;Landroid/view/View;J)Z
    .registers 14
    .param p1, "canvas"    # Landroid/graphics/Canvas;
    .param p2, "child"    # Landroid/view/View;
    .param p3, "drawingTime"    # J

    .line 230
    :try_start_0
    invoke-super {p0, p1, p2, p3, p4}, Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;->drawChild(Landroid/graphics/Canvas;Landroid/view/View;J)Z

    move-result v0
    :try_end_4
    .catchall {:try_start_0 .. :try_end_4} :catchall_5

    .line 233
    .local v0, "result":Z
    goto :goto_8

    .line 231
    .end local v0    # "result":Z
    :catchall_5
    move-exception v0

    .line 232
    .local v0, "ignore":Ljava/lang/Throwable;
    const/4 v1, 0x0

    move v0, v1

    .line 234
    .local v0, "result":Z
    :goto_8
    iget-object v1, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView$4;->this$0:Lim/tpelyyftgw/ui/components/PipRoundVideoView;

    # getter for: Lim/tpelyyftgw/ui/components/PipRoundVideoView;->textureView:Landroid/view/TextureView;
    invoke-static {v1}, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->access$500(Lim/tpelyyftgw/ui/components/PipRoundVideoView;)Landroid/view/TextureView;

    move-result-object v1

    if-ne p2, v1, :cond_56

    .line 235
    invoke-static {}, Lim/tpelyyftgw/messenger/MediaController;->getInstance()Lim/tpelyyftgw/messenger/MediaController;

    move-result-object v1

    invoke-virtual {v1}, Lim/tpelyyftgw/messenger/MediaController;->getPlayingMessageObject()Lim/tpelyyftgw/messenger/MessageObject;

    move-result-object v1

    .line 236
    .local v1, "currentMessageObject":Lim/tpelyyftgw/messenger/MessageObject;
    if-eqz v1, :cond_56

    .line 237
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView$4;->this$0:Lim/tpelyyftgw/ui/components/PipRoundVideoView;

    # getter for: Lim/tpelyyftgw/ui/components/PipRoundVideoView;->rect:Landroid/graphics/RectF;
    invoke-static {v2}, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->access$600(Lim/tpelyyftgw/ui/components/PipRoundVideoView;)Landroid/graphics/RectF;

    move-result-object v2

    const/high16 v3, 0x3fc00000    # 1.5f

    invoke-static {v3}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dpf2(F)F

    move-result v4

    invoke-static {v3}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dpf2(F)F

    move-result v5

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PipRoundVideoView$4;->getMeasuredWidth()I

    move-result v6

    int-to-float v6, v6

    invoke-static {v3}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dpf2(F)F

    move-result v7

    sub-float/2addr v6, v7

    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/PipRoundVideoView$4;->getMeasuredHeight()I

    move-result v7

    int-to-float v7, v7

    invoke-static {v3}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dpf2(F)F

    move-result v3

    sub-float/2addr v7, v3

    invoke-virtual {v2, v4, v5, v6, v7}, Landroid/graphics/RectF;->set(FFFF)V

    .line 238
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView$4;->this$0:Lim/tpelyyftgw/ui/components/PipRoundVideoView;

    # getter for: Lim/tpelyyftgw/ui/components/PipRoundVideoView;->rect:Landroid/graphics/RectF;
    invoke-static {v2}, Lim/tpelyyftgw/ui/components/PipRoundVideoView;->access$600(Lim/tpelyyftgw/ui/components/PipRoundVideoView;)Landroid/graphics/RectF;

    move-result-object v4

    const/high16 v5, -0x3d4c0000    # -90.0f

    const/high16 v2, 0x43b40000    # 360.0f

    iget v3, v1, Lim/tpelyyftgw/messenger/MessageObject;->audioProgress:F

    mul-float v6, v3, v2

    const/4 v7, 0x0

    sget-object v8, Lim/tpelyyftgw/ui/actionbar/Theme;->chat_radialProgressPaint:Landroid/graphics/Paint;

    move-object v3, p1

    invoke-virtual/range {v3 .. v8}, Landroid/graphics/Canvas;->drawArc(Landroid/graphics/RectF;FFZLandroid/graphics/Paint;)V

    .line 241
    .end local v1    # "currentMessageObject":Lim/tpelyyftgw/messenger/MessageObject;
    :cond_56
    return v0
.end method

.method protected onSizeChanged(IIII)V
    .registers 10
    .param p1, "w"    # I
    .param p2, "h"    # I
    .param p3, "oldw"    # I
    .param p4, "oldh"    # I

    .line 214
    invoke-super {p0, p1, p2, p3, p4}, Lcom/google/android/exoplayer2/ui/AspectRatioFrameLayout;->onSizeChanged(IIII)V

    .line 215
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView$4;->aspectPath:Landroid/graphics/Path;

    invoke-virtual {v0}, Landroid/graphics/Path;->reset()V

    .line 216
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView$4;->aspectPath:Landroid/graphics/Path;

    div-int/lit8 v1, p1, 0x2

    int-to-float v1, v1

    div-int/lit8 v2, p2, 0x2

    int-to-float v2, v2

    div-int/lit8 v3, p1, 0x2

    int-to-float v3, v3

    sget-object v4, Landroid/graphics/Path$Direction;->CW:Landroid/graphics/Path$Direction;

    invoke-virtual {v0, v1, v2, v3, v4}, Landroid/graphics/Path;->addCircle(FFFLandroid/graphics/Path$Direction;)V

    .line 217
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/PipRoundVideoView$4;->aspectPath:Landroid/graphics/Path;

    invoke-virtual {v0}, Landroid/graphics/Path;->toggleInverseFillType()V

    .line 218
    return-void
.end method