WebPlayerView$ControlsView.smali
.class Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;
.super Landroid/widget/FrameLayout;
.source "WebPlayerView.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lim/tpelyyftgw/ui/components/WebPlayerView;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x2
name = "ControlsView"
.end annotation
# instance fields
.field private bufferedPosition:I
.field private currentAnimation:Landroid/animation/AnimatorSet;
.field private currentProgressX:I
.field private duration:I
.field private durationLayout:Landroid/text/StaticLayout;
.field private durationWidth:I
.field private hideRunnable:Ljava/lang/Runnable;
.field private imageReceiver:Lim/tpelyyftgw/messenger/ImageReceiver;
.field private isVisible:Z
.field private lastProgressX:I
.field private progress:I
.field private progressBufferedPaint:Landroid/graphics/Paint;
.field private progressInnerPaint:Landroid/graphics/Paint;
.field private progressLayout:Landroid/text/StaticLayout;
.field private progressPaint:Landroid/graphics/Paint;
.field private progressPressed:Z
.field private textPaint:Landroid/text/TextPaint;
.field final synthetic this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
# direct methods
.method static constructor <clinit>()V
.registers 1
return-void
.end method
.method public constructor <init>(Lim/tpelyyftgw/ui/components/WebPlayerView;Landroid/content/Context;)V
.registers 6
.param p2, "context" # Landroid/content/Context;
.line 1257
iput-object p1, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
.line 1258
invoke-direct {p0, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V
.line 1251
const/4 p1, 0x1
iput-boolean p1, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->isVisible:Z
.line 1255
new-instance v0, Lim/tpelyyftgw/ui/components/-$$Lambda$WebPlayerView$ControlsView$q2_pgEh-oZMUWw0fqfNX6iFI1Eg;
invoke-direct {v0, p0}, Lim/tpelyyftgw/ui/components/-$$Lambda$WebPlayerView$ControlsView$q2_pgEh-oZMUWw0fqfNX6iFI1Eg;-><init>(Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;)V
iput-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->hideRunnable:Ljava/lang/Runnable;
.line 1259
const/4 v0, 0x0
invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->setWillNotDraw(Z)V
.line 1261
new-instance v0, Landroid/text/TextPaint;
invoke-direct {v0, p1}, Landroid/text/TextPaint;-><init>(I)V
iput-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->textPaint:Landroid/text/TextPaint;
.line 1262
const/4 v1, -0x1
invoke-virtual {v0, v1}, Landroid/text/TextPaint;->setColor(I)V
.line 1263
iget-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->textPaint:Landroid/text/TextPaint;
const/high16 v2, 0x41400000 # 12.0f
invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v2
int-to-float v2, v2
invoke-virtual {v0, v2}, Landroid/text/TextPaint;->setTextSize(F)V
.line 1265
new-instance v0, Landroid/graphics/Paint;
invoke-direct {v0, p1}, Landroid/graphics/Paint;-><init>(I)V
iput-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressPaint:Landroid/graphics/Paint;
.line 1266
const v2, -0xe65818
invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setColor(I)V
.line 1268
new-instance v0, Landroid/graphics/Paint;
invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V
iput-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressInnerPaint:Landroid/graphics/Paint;
.line 1269
const v2, -0x6a6e69
invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setColor(I)V
.line 1271
new-instance v0, Landroid/graphics/Paint;
invoke-direct {v0, p1}, Landroid/graphics/Paint;-><init>(I)V
iput-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressBufferedPaint:Landroid/graphics/Paint;
.line 1272
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V
.line 1274
new-instance p1, Lim/tpelyyftgw/messenger/ImageReceiver;
invoke-direct {p1, p0}, Lim/tpelyyftgw/messenger/ImageReceiver;-><init>(Landroid/view/View;)V
iput-object p1, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->imageReceiver:Lim/tpelyyftgw/messenger/ImageReceiver;
.line 1275
return-void
.end method
.method static synthetic access$4102(Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;Landroid/animation/AnimatorSet;)Landroid/animation/AnimatorSet;
.registers 2
.param p0, "x0" # Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;
.param p1, "x1" # Landroid/animation/AnimatorSet;
.line 1237
iput-object p1, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentAnimation:Landroid/animation/AnimatorSet;
return-object p1
.end method
.method static synthetic access$4800(Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;)Lim/tpelyyftgw/messenger/ImageReceiver;
.registers 2
.param p0, "x0" # Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;
.line 1237
iget-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->imageReceiver:Lim/tpelyyftgw/messenger/ImageReceiver;
return-object v0
.end method
.method static synthetic access$4900(Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;)V
.registers 1
.param p0, "x0" # Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;
.line 1237
invoke-direct {p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->checkNeedHide()V
return-void
.end method
.method private checkNeedHide()V
.registers 4
.line 1346
iget-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->hideRunnable:Ljava/lang/Runnable;
invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->cancelRunOnUIThread(Ljava/lang/Runnable;)V
.line 1347
iget-boolean v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->isVisible:Z
if-eqz v0, :cond_1c
iget-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v0}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$000(Lim/tpelyyftgw/ui/components/WebPlayerView;)Lim/tpelyyftgw/ui/components/VideoPlayer;
move-result-object v0
invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/VideoPlayer;->isPlaying()Z
move-result v0
if-eqz v0, :cond_1c
.line 1348
iget-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->hideRunnable:Ljava/lang/Runnable;
const-wide/16 v1, 0xbb8
invoke-static {v0, v1, v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->runOnUIThread(Ljava/lang/Runnable;J)V
.line 1350
:cond_1c
return-void
.end method
# virtual methods
.method public synthetic lambda$new$0$WebPlayerView$ControlsView()V
.registers 3
.line 1255
const/4 v0, 0x0
const/4 v1, 0x1
invoke-virtual {p0, v0, v1}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->show(ZZ)V
return-void
.end method
.method protected onDraw(Landroid/graphics/Canvas;)V
.registers 20
.param p1, "canvas" # Landroid/graphics/Canvas;
.line 1436
move-object/from16 v0, p0
move-object/from16 v7, p1
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v1}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$4300(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v1
if-eqz v1, :cond_60
.line 1437
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v1}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$4400(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v1
if-eqz v1, :cond_50
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v1}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$4500(Lim/tpelyyftgw/ui/components/WebPlayerView;)F
move-result v1
const/4 v2, 0x0
cmpl-float v1, v1, v2
if-eqz v1, :cond_50
.line 1438
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v3
.line 1439
.local v3, "newTime":J
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v1}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$4600(Lim/tpelyyftgw/ui/components/WebPlayerView;)J
move-result-wide v5
sub-long v5, v3, v5
.line 1440
.local v5, "dt":J
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v1, v3, v4}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$4602(Lim/tpelyyftgw/ui/components/WebPlayerView;J)J
.line 1441
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v1}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$4500(Lim/tpelyyftgw/ui/components/WebPlayerView;)F
move-result v8
long-to-float v9, v5
const/high16 v10, 0x43160000 # 150.0f
div-float/2addr v9, v10
sub-float/2addr v8, v9
invoke-static {v1, v8}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$4502(Lim/tpelyyftgw/ui/components/WebPlayerView;F)F
.line 1442
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v1}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$4500(Lim/tpelyyftgw/ui/components/WebPlayerView;)F
move-result v1
cmpg-float v1, v1, v2
if-gez v1, :cond_4d
.line 1443
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v1, v2}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$4502(Lim/tpelyyftgw/ui/components/WebPlayerView;F)F
.line 1445
:cond_4d
invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->invalidate()V
.line 1447
.end local v3 # "newTime":J
.end local v5 # "dt":J
:cond_50
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->imageReceiver:Lim/tpelyyftgw/messenger/ImageReceiver;
iget-object v2, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v2}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$4500(Lim/tpelyyftgw/ui/components/WebPlayerView;)F
move-result v2
invoke-virtual {v1, v2}, Lim/tpelyyftgw/messenger/ImageReceiver;->setAlpha(F)V
.line 1448
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->imageReceiver:Lim/tpelyyftgw/messenger/ImageReceiver;
invoke-virtual {v1, v7}, Lim/tpelyyftgw/messenger/ImageReceiver;->draw(Landroid/graphics/Canvas;)Z
.line 1450
:cond_60
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v1}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$000(Lim/tpelyyftgw/ui/components/WebPlayerView;)Lim/tpelyyftgw/ui/components/VideoPlayer;
move-result-object v1
invoke-virtual {v1}, Lim/tpelyyftgw/ui/components/VideoPlayer;->isPlayerPrepared()Z
move-result v1
if-eqz v1, :cond_1e8
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v1}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$1600(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v1
if-nez v1, :cond_1e8
.line 1451
invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->getMeasuredWidth()I
move-result v8
.line 1452
.local v8, "width":I
invoke-virtual/range {p0 .. p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->getMeasuredHeight()I
move-result v9
.line 1453
.local v9, "height":I
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v1}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$3400(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v1
if-nez v1, :cond_e9
.line 1454
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->durationLayout:Landroid/text/StaticLayout;
const/4 v2, 0x6
const/16 v3, 0xa
if-eqz v1, :cond_bb
.line 1455
invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->save()I
.line 1456
const/high16 v1, 0x42680000 # 58.0f
invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v1
sub-int v1, v8, v1
iget v4, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->durationWidth:I
sub-int/2addr v1, v4
int-to-float v1, v1
iget-object v4, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v4}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$4200(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v4
if-eqz v4, :cond_a4
const/4 v4, 0x6
goto :goto_a6
:cond_a4
const/16 v4, 0xa
:goto_a6
add-int/lit8 v4, v4, 0x1d
int-to-float v4, v4
invoke-static {v4}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v4
sub-int v4, v9, v4
int-to-float v4, v4
invoke-virtual {v7, v1, v4}, Landroid/graphics/Canvas;->translate(FF)V
.line 1457
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->durationLayout:Landroid/text/StaticLayout;
invoke-virtual {v1, v7}, Landroid/text/StaticLayout;->draw(Landroid/graphics/Canvas;)V
.line 1458
invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->restore()V
.line 1461
:cond_bb
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressLayout:Landroid/text/StaticLayout;
if-eqz v1, :cond_e9
.line 1462
invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->save()I
.line 1463
const/high16 v1, 0x41900000 # 18.0f
invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v1
int-to-float v1, v1
iget-object v4, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v4}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$4200(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v4
if-eqz v4, :cond_d2
goto :goto_d4
:cond_d2
const/16 v2, 0xa
:goto_d4
add-int/lit8 v2, v2, 0x1d
int-to-float v2, v2
invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v2
sub-int v2, v9, v2
int-to-float v2, v2
invoke-virtual {v7, v1, v2}, Landroid/graphics/Canvas;->translate(FF)V
.line 1464
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressLayout:Landroid/text/StaticLayout;
invoke-virtual {v1, v7}, Landroid/text/StaticLayout;->draw(Landroid/graphics/Canvas;)V
.line 1465
invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->restore()V
.line 1469
:cond_e9
iget v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->duration:I
if-eqz v1, :cond_1e8
.line 1475
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v1}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$3400(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v1
const/high16 v10, 0x40e00000 # 7.0f
const/high16 v11, 0x40400000 # 3.0f
if-eqz v1, :cond_10c
.line 1476
invoke-static {v11}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v1
sub-int v1, v9, v1
.line 1477
.local v1, "progressLineY":I
const/4 v2, 0x0
.line 1478
.local v2, "progressLineX":I
move v3, v8
.line 1479
.local v3, "progressLineEndX":I
invoke-static {v10}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v4
sub-int v4, v9, v4
move v12, v1
move v13, v2
move v14, v3
move v15, v4
.local v4, "cy":I
goto :goto_153
.line 1480
.end local v1 # "progressLineY":I
.end local v2 # "progressLineX":I
.end local v3 # "progressLineEndX":I
.end local v4 # "cy":I
:cond_10c
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v1}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$4200(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v1
if-eqz v1, :cond_13d
.line 1481
const/high16 v1, 0x41e80000 # 29.0f
invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v1
sub-int v1, v9, v1
.line 1482
.restart local v1 # "progressLineY":I
const/high16 v2, 0x42100000 # 36.0f
invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v2
iget v3, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->durationWidth:I
add-int/2addr v2, v3
.line 1483
.restart local v2 # "progressLineX":I
const/high16 v3, 0x42980000 # 76.0f
invoke-static {v3}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v3
sub-int v3, v8, v3
iget v4, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->durationWidth:I
sub-int/2addr v3, v4
.line 1484
.restart local v3 # "progressLineEndX":I
const/high16 v4, 0x41e00000 # 28.0f
invoke-static {v4}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v4
sub-int v4, v9, v4
move v12, v1
move v13, v2
move v14, v3
move v15, v4
.restart local v4 # "cy":I
goto :goto_153
.line 1486
.end local v1 # "progressLineY":I
.end local v2 # "progressLineX":I
.end local v3 # "progressLineEndX":I
.end local v4 # "cy":I
:cond_13d
const/high16 v1, 0x41500000 # 13.0f
invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v1
sub-int v1, v9, v1
.line 1487
.restart local v1 # "progressLineY":I
const/4 v2, 0x0
.line 1488
.restart local v2 # "progressLineX":I
move v3, v8
.line 1489
.restart local v3 # "progressLineEndX":I
const/high16 v4, 0x41400000 # 12.0f
invoke-static {v4}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v4
sub-int v4, v9, v4
move v12, v1
move v13, v2
move v14, v3
move v15, v4
.line 1491
.end local v1 # "progressLineY":I
.end local v2 # "progressLineX":I
.end local v3 # "progressLineEndX":I
.local v12, "progressLineY":I
.local v13, "progressLineX":I
.local v14, "progressLineEndX":I
.local v15, "cy":I
:goto_153
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v1}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$4200(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v1
if-eqz v1, :cond_16b
.line 1492
int-to-float v2, v13
int-to-float v3, v12
int-to-float v4, v14
invoke-static {v11}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v1
add-int/2addr v1, v12
int-to-float v5, v1
iget-object v6, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressInnerPaint:Landroid/graphics/Paint;
move-object/from16 v1, p1
invoke-virtual/range {v1 .. v6}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V
.line 1495
:cond_16b
iget-boolean v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressPressed:Z
if-eqz v1, :cond_173
.line 1496
iget v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentProgressX:I
move v6, v1
.local v1, "progressX":I
goto :goto_182
.line 1498
.end local v1 # "progressX":I
:cond_173
sub-int v1, v14, v13
int-to-float v1, v1
iget v2, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progress:I
int-to-float v2, v2
iget v3, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->duration:I
int-to-float v3, v3
div-float/2addr v2, v3
mul-float v1, v1, v2
float-to-int v1, v1
add-int/2addr v1, v13
move v6, v1
.line 1500
.local v6, "progressX":I
:goto_182
iget v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->bufferedPosition:I
if-eqz v1, :cond_1b8
iget v2, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->duration:I
if-eqz v2, :cond_1b8
.line 1501
int-to-float v3, v13
int-to-float v4, v12
int-to-float v5, v13
sub-int v10, v14, v13
int-to-float v10, v10
int-to-float v1, v1
int-to-float v2, v2
div-float/2addr v1, v2
mul-float v10, v10, v1
add-float/2addr v5, v10
invoke-static {v11}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v1
add-int/2addr v1, v12
int-to-float v10, v1
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v1}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$4200(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v1
if-eqz v1, :cond_1a7
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressBufferedPaint:Landroid/graphics/Paint;
goto :goto_1a9
:cond_1a7
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressInnerPaint:Landroid/graphics/Paint;
:goto_1a9
move-object/from16 v17, v1
move-object/from16 v1, p1
move v2, v3
move v3, v4
move v4, v5
move v5, v10
move v10, v6
.end local v6 # "progressX":I
.local v10, "progressX":I
move-object/from16 v6, v17
invoke-virtual/range {v1 .. v6}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V
goto :goto_1b9
.line 1500
.end local v10 # "progressX":I
.restart local v6 # "progressX":I
:cond_1b8
move v10, v6
.line 1503
.end local v6 # "progressX":I
.restart local v10 # "progressX":I
:goto_1b9
int-to-float v2, v13
int-to-float v3, v12
int-to-float v4, v10
invoke-static {v11}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v1
add-int/2addr v1, v12
int-to-float v5, v1
iget-object v6, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressPaint:Landroid/graphics/Paint;
move-object/from16 v1, p1
invoke-virtual/range {v1 .. v6}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V
.line 1504
iget-object v1, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v1}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$3400(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v1
if-nez v1, :cond_1e8
.line 1505
int-to-float v1, v10
int-to-float v2, v15
iget-boolean v3, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressPressed:Z
if-eqz v3, :cond_1da
const/high16 v16, 0x40e00000 # 7.0f
goto :goto_1de
:cond_1da
const/high16 v3, 0x40a00000 # 5.0f
const/high16 v16, 0x40a00000 # 5.0f
:goto_1de
invoke-static/range {v16 .. v16}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v3
int-to-float v3, v3
iget-object v4, v0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressPaint:Landroid/graphics/Paint;
invoke-virtual {v7, v1, v2, v3, v4}, Landroid/graphics/Canvas;->drawCircle(FFFLandroid/graphics/Paint;)V
.line 1509
.end local v8 # "width":I
.end local v9 # "height":I
.end local v10 # "progressX":I
.end local v12 # "progressLineY":I
.end local v13 # "progressLineX":I
.end local v14 # "progressLineEndX":I
.end local v15 # "cy":I
:cond_1e8
return-void
.end method
.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
.registers 3
.param p1, "ev" # Landroid/view/MotionEvent;
.line 1354
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
move-result v0
if-nez v0, :cond_15
.line 1355
iget-boolean v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->isVisible:Z
if-nez v0, :cond_f
.line 1356
const/4 v0, 0x1
invoke-virtual {p0, v0, v0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->show(ZZ)V
.line 1357
return v0
.line 1359
:cond_f
invoke-virtual {p0, p1}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->onTouchEvent(Landroid/view/MotionEvent;)Z
.line 1360
iget-boolean v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressPressed:Z
return v0
.line 1362
:cond_15
invoke-super {p0, p1}, Landroid/widget/FrameLayout;->onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
return v0
.end method
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
.registers 13
.param p1, "event" # Landroid/view/MotionEvent;
.line 1376
iget-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v0}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$4200(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v0
if-eqz v0, :cond_2b
.line 1377
const/high16 v0, 0x42100000 # 36.0f
invoke-static {v0}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v0
iget v1, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->durationWidth:I
add-int/2addr v0, v1
.line 1378
.local v0, "progressLineX":I
invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->getMeasuredWidth()I
move-result v1
const/high16 v2, 0x42980000 # 76.0f
invoke-static {v2}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v2
sub-int/2addr v1, v2
iget v2, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->durationWidth:I
sub-int/2addr v1, v2
.line 1379
.local v1, "progressLineEndX":I
invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->getMeasuredHeight()I
move-result v2
const/high16 v3, 0x41e00000 # 28.0f
invoke-static {v3}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v3
sub-int/2addr v2, v3
.local v2, "progressY":I
goto :goto_3b
.line 1381
.end local v0 # "progressLineX":I
.end local v1 # "progressLineEndX":I
.end local v2 # "progressY":I
:cond_2b
const/4 v0, 0x0
.line 1382
.restart local v0 # "progressLineX":I
invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->getMeasuredWidth()I
move-result v1
.line 1383
.restart local v1 # "progressLineEndX":I
invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->getMeasuredHeight()I
move-result v2
const/high16 v3, 0x41400000 # 12.0f
invoke-static {v3}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v3
sub-int/2addr v2, v3
.line 1386
.restart local v2 # "progressY":I
:goto_3b
iget v3, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->duration:I
const/4 v4, 0x0
if-eqz v3, :cond_4c
sub-int v5, v1, v0
int-to-float v5, v5
iget v6, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progress:I
int-to-float v6, v6
int-to-float v3, v3
div-float/2addr v6, v3
mul-float v5, v5, v6
float-to-int v3, v5
goto :goto_4d
:cond_4c
const/4 v3, 0x0
:goto_4d
add-int/2addr v3, v0
.line 1388
.local v3, "progressX":I
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
move-result v5
const/4 v6, 0x1
if-nez v5, :cond_b2
.line 1389
iget-boolean v4, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->isVisible:Z
if-eqz v4, :cond_a8
iget-object v4, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v4}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$3400(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v4
if-nez v4, :cond_a8
iget-object v4, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v4}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$1600(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v4
if-nez v4, :cond_a8
.line 1390
iget v4, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->duration:I
if-eqz v4, :cond_ab
.line 1391
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v4
float-to-int v4, v4
.line 1392
.local v4, "x":I
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
move-result v5
float-to-int v5, v5
.line 1393
.local v5, "y":I
const/high16 v7, 0x41200000 # 10.0f
invoke-static {v7}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v8
sub-int v8, v3, v8
if-lt v4, v8, :cond_a7
invoke-static {v7}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v8
add-int/2addr v8, v3
if-gt v4, v8, :cond_a7
invoke-static {v7}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v8
sub-int v8, v2, v8
if-lt v5, v8, :cond_a7
invoke-static {v7}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v7
add-int/2addr v7, v2
if-gt v5, v7, :cond_a7
.line 1394
iput-boolean v6, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressPressed:Z
.line 1395
iput v4, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->lastProgressX:I
.line 1396
iput v3, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentProgressX:I
.line 1397
invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->getParent()Landroid/view/ViewParent;
move-result-object v7
invoke-interface {v7, v6}, Landroid/view/ViewParent;->requestDisallowInterceptTouchEvent(Z)V
.line 1398
invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->invalidate()V
.line 1400
.end local v4 # "x":I
.end local v5 # "y":I
:cond_a7
goto :goto_ab
.line 1402
:cond_a8
invoke-virtual {p0, v6, v6}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->show(ZZ)V
.line 1404
:cond_ab
:goto_ab
iget-object v4, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->hideRunnable:Ljava/lang/Runnable;
invoke-static {v4}, Lim/tpelyyftgw/messenger/AndroidUtilities;->cancelRunOnUIThread(Ljava/lang/Runnable;)V
goto/16 :goto_143
.line 1405
:cond_b2
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
move-result v5
if-eq v5, v6, :cond_fa
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
move-result v5
const/4 v7, 0x3
if-ne v5, v7, :cond_c0
goto :goto_fa
.line 1416
:cond_c0
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
move-result v4
const/4 v5, 0x2
if-ne v4, v5, :cond_143
.line 1417
iget-boolean v4, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressPressed:Z
if-eqz v4, :cond_143
.line 1418
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v4
float-to-int v4, v4
.line 1419
.restart local v4 # "x":I
iget v5, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentProgressX:I
iget v7, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->lastProgressX:I
sub-int/2addr v7, v4
sub-int/2addr v5, v7
iput v5, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentProgressX:I
.line 1420
iput v4, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->lastProgressX:I
.line 1421
if-ge v5, v0, :cond_df
.line 1422
iput v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentProgressX:I
goto :goto_e3
.line 1423
:cond_df
if-le v5, v1, :cond_e3
.line 1424
iput v1, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentProgressX:I
.line 1426
:cond_e3
:goto_e3
iget v5, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->duration:I
mul-int/lit16 v5, v5, 0x3e8
int-to-float v5, v5
iget v7, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentProgressX:I
sub-int/2addr v7, v0
int-to-float v7, v7
sub-int v8, v1, v0
int-to-float v8, v8
div-float/2addr v7, v8
mul-float v5, v5, v7
float-to-int v5, v5
invoke-virtual {p0, v5}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->setProgress(I)V
.line 1427
invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->invalidate()V
goto :goto_143
.line 1406
.end local v4 # "x":I
:cond_fa
:goto_fa
iget-object v5, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v5}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$1300(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v5
if-eqz v5, :cond_115
iget-object v5, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v5}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$000(Lim/tpelyyftgw/ui/components/WebPlayerView;)Lim/tpelyyftgw/ui/components/VideoPlayer;
move-result-object v5
invoke-virtual {v5}, Lim/tpelyyftgw/ui/components/VideoPlayer;->isPlaying()Z
move-result v5
if-eqz v5, :cond_115
.line 1407
iget-object v5, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->hideRunnable:Ljava/lang/Runnable;
const-wide/16 v7, 0xbb8
invoke-static {v5, v7, v8}, Lim/tpelyyftgw/messenger/AndroidUtilities;->runOnUIThread(Ljava/lang/Runnable;J)V
.line 1409
:cond_115
iget-boolean v5, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressPressed:Z
if-eqz v5, :cond_143
.line 1410
iput-boolean v4, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressPressed:Z
.line 1411
iget-object v4, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v4}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$1300(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v4
if-eqz v4, :cond_143
.line 1412
iget v4, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->duration:I
int-to-float v4, v4
iget v5, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentProgressX:I
sub-int/2addr v5, v0
int-to-float v5, v5
sub-int v7, v1, v0
int-to-float v7, v7
div-float/2addr v5, v7
mul-float v4, v4, v5
float-to-int v4, v4
iput v4, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progress:I
.line 1413
iget-object v4, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v4}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$000(Lim/tpelyyftgw/ui/components/WebPlayerView;)Lim/tpelyyftgw/ui/components/VideoPlayer;
move-result-object v4
iget v5, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progress:I
int-to-long v7, v5
const-wide/16 v9, 0x3e8
mul-long v7, v7, v9
invoke-virtual {v4, v7, v8}, Lim/tpelyyftgw/ui/components/VideoPlayer;->seekTo(J)V
.line 1430
:cond_143
:goto_143
invoke-super {p0, p1}, Landroid/widget/FrameLayout;->onTouchEvent(Landroid/view/MotionEvent;)Z
.line 1431
return v6
.end method
.method public requestDisallowInterceptTouchEvent(Z)V
.registers 2
.param p1, "disallowIntercept" # Z
.line 1367
invoke-super {p0, p1}, Landroid/widget/FrameLayout;->requestDisallowInterceptTouchEvent(Z)V
.line 1368
invoke-direct {p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->checkNeedHide()V
.line 1369
return-void
.end method
.method public setBufferedProgress(I)V
.registers 2
.param p1, "position" # I
.line 1290
iput p1, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->bufferedPosition:I
.line 1291
invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->invalidate()V
.line 1292
return-void
.end method
.method public setDuration(I)V
.registers 12
.param p1, "value" # I
.line 1278
iget v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->duration:I
if-eq v0, p1, :cond_60
if-ltz p1, :cond_60
iget-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v0}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$1600(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v0
if-eqz v0, :cond_f
goto :goto_60
.line 1281
:cond_f
iput p1, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->duration:I
.line 1282
new-instance v0, Landroid/text/StaticLayout;
sget-object v1, Ljava/util/Locale;->US:Ljava/util/Locale;
const/4 v2, 0x2
new-array v2, v2, [Ljava/lang/Object;
iget v3, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->duration:I
div-int/lit8 v3, v3, 0x3c
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
const/4 v9, 0x0
aput-object v3, v2, v9
const/4 v3, 0x1
iget v4, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->duration:I
rem-int/lit8 v4, v4, 0x3c
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
aput-object v4, v2, v3
const-string v3, "%d:%02d"
invoke-static {v1, v3, v2}, Ljava/lang/String;->format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v2
iget-object v3, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->textPaint:Landroid/text/TextPaint;
const/high16 v1, 0x447a0000 # 1000.0f
invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v4
sget-object v5, Landroid/text/Layout$Alignment;->ALIGN_NORMAL:Landroid/text/Layout$Alignment;
const/high16 v6, 0x3f800000 # 1.0f
const/4 v7, 0x0
const/4 v8, 0x0
move-object v1, v0
invoke-direct/range {v1 .. v8}, Landroid/text/StaticLayout;-><init>(Ljava/lang/CharSequence;Landroid/text/TextPaint;ILandroid/text/Layout$Alignment;FFZ)V
iput-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->durationLayout:Landroid/text/StaticLayout;
.line 1283
invoke-virtual {v0}, Landroid/text/StaticLayout;->getLineCount()I
move-result v0
if-lez v0, :cond_5c
.line 1284
iget-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->durationLayout:Landroid/text/StaticLayout;
invoke-virtual {v0, v9}, Landroid/text/StaticLayout;->getLineWidth(I)F
move-result v0
float-to-double v0, v0
invoke-static {v0, v1}, Ljava/lang/Math;->ceil(D)D
move-result-wide v0
double-to-int v0, v0
iput v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->durationWidth:I
.line 1286
:cond_5c
invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->invalidate()V
.line 1287
return-void
.line 1279
:cond_60
:goto_60
return-void
.end method
.method public setProgress(I)V
.registers 11
.param p1, "value" # I
.line 1295
iget-boolean v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressPressed:Z
if-nez v0, :cond_4c
if-ltz p1, :cond_4c
iget-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->this$0:Lim/tpelyyftgw/ui/components/WebPlayerView;
invoke-static {v0}, Lim/tpelyyftgw/ui/components/WebPlayerView;->access$1600(Lim/tpelyyftgw/ui/components/WebPlayerView;)Z
move-result v0
if-eqz v0, :cond_f
goto :goto_4c
.line 1298
:cond_f
iput p1, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progress:I
.line 1299
new-instance v0, Landroid/text/StaticLayout;
sget-object v1, Ljava/util/Locale;->US:Ljava/util/Locale;
const/4 v2, 0x2
new-array v2, v2, [Ljava/lang/Object;
const/4 v3, 0x0
iget v4, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progress:I
div-int/lit8 v4, v4, 0x3c
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
aput-object v4, v2, v3
const/4 v3, 0x1
iget v4, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progress:I
rem-int/lit8 v4, v4, 0x3c
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
aput-object v4, v2, v3
const-string v3, "%d:%02d"
invoke-static {v1, v3, v2}, Ljava/lang/String;->format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v2
iget-object v3, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->textPaint:Landroid/text/TextPaint;
const/high16 v1, 0x447a0000 # 1000.0f
invoke-static {v1}, Lim/tpelyyftgw/messenger/AndroidUtilities;->dp(F)I
move-result v4
sget-object v5, Landroid/text/Layout$Alignment;->ALIGN_NORMAL:Landroid/text/Layout$Alignment;
const/high16 v6, 0x3f800000 # 1.0f
const/4 v7, 0x0
const/4 v8, 0x0
move-object v1, v0
invoke-direct/range {v1 .. v8}, Landroid/text/StaticLayout;-><init>(Ljava/lang/CharSequence;Landroid/text/TextPaint;ILandroid/text/Layout$Alignment;FFZ)V
iput-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->progressLayout:Landroid/text/StaticLayout;
.line 1300
invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->invalidate()V
.line 1301
return-void
.line 1296
:cond_4c
:goto_4c
return-void
.end method
.method public show(ZZ)V
.registers 11
.param p1, "value" # Z
.param p2, "animated" # Z
.line 1304
iget-boolean v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->isVisible:Z
if-ne v0, p1, :cond_5
.line 1305
return-void
.line 1307
:cond_5
iput-boolean p1, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->isVisible:Z
.line 1308
iget-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentAnimation:Landroid/animation/AnimatorSet;
if-eqz v0, :cond_e
.line 1309
invoke-virtual {v0}, Landroid/animation/AnimatorSet;->cancel()V
.line 1311
:cond_e
iget-boolean v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->isVisible:Z
const-wide/16 v1, 0x96
const-string v3, "alpha"
const/4 v4, 0x0
const/4 v5, 0x1
if-eqz v0, :cond_4b
.line 1312
const/high16 v0, 0x3f800000 # 1.0f
if-eqz p2, :cond_47
.line 1313
new-instance v6, Landroid/animation/AnimatorSet;
invoke-direct {v6}, Landroid/animation/AnimatorSet;-><init>()V
iput-object v6, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentAnimation:Landroid/animation/AnimatorSet;
.line 1314
new-array v7, v5, [Landroid/animation/Animator;
new-array v5, v5, [F
aput v0, v5, v4
invoke-static {p0, v3, v5}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;
move-result-object v0
aput-object v0, v7, v4
invoke-virtual {v6, v7}, Landroid/animation/AnimatorSet;->playTogether([Landroid/animation/Animator;)V
.line 1315
iget-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentAnimation:Landroid/animation/AnimatorSet;
invoke-virtual {v0, v1, v2}, Landroid/animation/AnimatorSet;->setDuration(J)Landroid/animation/AnimatorSet;
.line 1316
iget-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentAnimation:Landroid/animation/AnimatorSet;
new-instance v1, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView$1;
invoke-direct {v1, p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView$1;-><init>(Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;)V
invoke-virtual {v0, v1}, Landroid/animation/AnimatorSet;->addListener(Landroid/animation/Animator$AnimatorListener;)V
.line 1322
iget-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentAnimation:Landroid/animation/AnimatorSet;
invoke-virtual {v0}, Landroid/animation/AnimatorSet;->start()V
goto :goto_7c
.line 1324
:cond_47
invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->setAlpha(F)V
goto :goto_7c
.line 1327
:cond_4b
const/4 v0, 0x0
if-eqz p2, :cond_79
.line 1328
new-instance v6, Landroid/animation/AnimatorSet;
invoke-direct {v6}, Landroid/animation/AnimatorSet;-><init>()V
iput-object v6, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentAnimation:Landroid/animation/AnimatorSet;
.line 1329
new-array v7, v5, [Landroid/animation/Animator;
new-array v5, v5, [F
aput v0, v5, v4
invoke-static {p0, v3, v5}, Landroid/animation/ObjectAnimator;->ofFloat(Ljava/lang/Object;Ljava/lang/String;[F)Landroid/animation/ObjectAnimator;
move-result-object v0
aput-object v0, v7, v4
invoke-virtual {v6, v7}, Landroid/animation/AnimatorSet;->playTogether([Landroid/animation/Animator;)V
.line 1330
iget-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentAnimation:Landroid/animation/AnimatorSet;
invoke-virtual {v0, v1, v2}, Landroid/animation/AnimatorSet;->setDuration(J)Landroid/animation/AnimatorSet;
.line 1331
iget-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentAnimation:Landroid/animation/AnimatorSet;
new-instance v1, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView$2;
invoke-direct {v1, p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView$2;-><init>(Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;)V
invoke-virtual {v0, v1}, Landroid/animation/AnimatorSet;->addListener(Landroid/animation/Animator$AnimatorListener;)V
.line 1337
iget-object v0, p0, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->currentAnimation:Landroid/animation/AnimatorSet;
invoke-virtual {v0}, Landroid/animation/AnimatorSet;->start()V
goto :goto_7c
.line 1339
:cond_79
invoke-virtual {p0, v0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->setAlpha(F)V
.line 1342
:goto_7c
invoke-direct {p0}, Lim/tpelyyftgw/ui/components/WebPlayerView$ControlsView;->checkNeedHide()V
.line 1343
return-void
.end method