ChatActivityEnterView$SeekBarWaveformView.smali

.class Lim/tpelyyftgw/ui/components/ChatActivityEnterView$SeekBarWaveformView;
.super Landroid/view/View;
.source "ChatActivityEnterView.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lim/tpelyyftgw/ui/components/ChatActivityEnterView;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "SeekBarWaveformView"
.end annotation


# instance fields
.field final synthetic this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;


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

    return-void
.end method

.method public constructor <init>(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;Landroid/content/Context;)V
    .registers 4
    .param p2, "context"    # Landroid/content/Context;

    .line 180
    iput-object p1, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$SeekBarWaveformView;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    .line 181
    invoke-direct {p0, p2}, Landroid/view/View;-><init>(Landroid/content/Context;)V

    .line 182
    new-instance v0, Lim/tpelyyftgw/ui/components/SeekBarWaveform;

    invoke-direct {v0, p2}, Lim/tpelyyftgw/ui/components/SeekBarWaveform;-><init>(Landroid/content/Context;)V

    invoke-static {p1, v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$002(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;Lim/tpelyyftgw/ui/components/SeekBarWaveform;)Lim/tpelyyftgw/ui/components/SeekBarWaveform;

    .line 183
    invoke-static {p1}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$000(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/ui/components/SeekBarWaveform;

    move-result-object p1

    new-instance v0, Lim/tpelyyftgw/ui/components/-$$Lambda$ChatActivityEnterView$SeekBarWaveformView$f4CQXEw-spu3Tmurk_kRjb3IxtA;

    invoke-direct {v0, p0}, Lim/tpelyyftgw/ui/components/-$$Lambda$ChatActivityEnterView$SeekBarWaveformView$f4CQXEw-spu3Tmurk_kRjb3IxtA;-><init>(Lim/tpelyyftgw/ui/components/ChatActivityEnterView$SeekBarWaveformView;)V

    invoke-virtual {p1, v0}, Lim/tpelyyftgw/ui/components/SeekBarWaveform;->setDelegate(Lim/tpelyyftgw/ui/components/SeekBar$SeekBarDelegate;)V

    .line 189
    return-void
.end method


# virtual methods
.method public isDragging()Z
    .registers 2

    .line 202
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$SeekBarWaveformView;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$000(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/ui/components/SeekBarWaveform;

    move-result-object v0

    invoke-virtual {v0}, Lim/tpelyyftgw/ui/components/SeekBarWaveform;->isDragging()Z

    move-result v0

    return v0
.end method

.method public synthetic lambda$new$0$ChatActivityEnterView$SeekBarWaveformView(F)V
    .registers 4
    .param p1, "progress"    # F

    .line 184
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$SeekBarWaveformView;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$100(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/messenger/MessageObject;

    move-result-object v0

    if-eqz v0, :cond_1d

    .line 185
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$SeekBarWaveformView;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$100(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/messenger/MessageObject;

    move-result-object v0

    iput p1, v0, Lim/tpelyyftgw/messenger/MessageObject;->audioProgress:F

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

    move-result-object v0

    iget-object v1, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$SeekBarWaveformView;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v1}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$100(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/messenger/MessageObject;

    move-result-object v1

    invoke-virtual {v0, v1, p1}, Lim/tpelyyftgw/messenger/MediaController;->seekToProgress(Lim/tpelyyftgw/messenger/MessageObject;F)Z

    .line 188
    :cond_1d
    return-void
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .registers 6
    .param p1, "canvas"    # Landroid/graphics/Canvas;

    .line 225
    invoke-super {p0, p1}, Landroid/view/View;->onDraw(Landroid/graphics/Canvas;)V

    .line 226
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$SeekBarWaveformView;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$000(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/ui/components/SeekBarWaveform;

    move-result-object v0

    const-string v1, "chat_recordedVoiceProgress"

    invoke-static {v1}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v2

    const-string v3, "chat_recordedVoiceProgressInner"

    invoke-static {v3}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v3

    invoke-static {v1}, Lim/tpelyyftgw/ui/actionbar/Theme;->getColor(Ljava/lang/String;)I

    move-result v1

    invoke-virtual {v0, v2, v3, v1}, Lim/tpelyyftgw/ui/components/SeekBarWaveform;->setColors(III)V

    .line 227
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$SeekBarWaveformView;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$000(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/ui/components/SeekBarWaveform;

    move-result-object v0

    invoke-virtual {v0, p1}, Lim/tpelyyftgw/ui/components/SeekBarWaveform;->draw(Landroid/graphics/Canvas;)V

    .line 228
    return-void
.end method

.method protected onLayout(ZIIII)V
    .registers 9
    .param p1, "changed"    # Z
    .param p2, "left"    # I
    .param p3, "top"    # I
    .param p4, "right"    # I
    .param p5, "bottom"    # I

    .line 219
    invoke-super/range {p0 .. p5}, Landroid/view/View;->onLayout(ZIIII)V

    .line 220
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$SeekBarWaveformView;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$000(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/ui/components/SeekBarWaveform;

    move-result-object v0

    sub-int v1, p4, p2

    sub-int v2, p5, p3

    invoke-virtual {v0, v1, v2}, Lim/tpelyyftgw/ui/components/SeekBarWaveform;->setSize(II)V

    .line 221
    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .registers 6
    .param p1, "event"    # Landroid/view/MotionEvent;

    .line 207
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$SeekBarWaveformView;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$000(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/ui/components/SeekBarWaveform;

    move-result-object v0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v1

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v2

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v3

    invoke-virtual {v0, v1, v2, v3}, Lim/tpelyyftgw/ui/components/SeekBarWaveform;->onTouch(IFF)Z

    move-result v0

    .line 208
    .local v0, "result":Z
    const/4 v1, 0x1

    if-eqz v0, :cond_27

    .line 209
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v2

    if-nez v2, :cond_24

    .line 210
    iget-object v2, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$SeekBarWaveformView;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-virtual {v2, v1}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->requestDisallowInterceptTouchEvent(Z)V

    .line 212
    :cond_24
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$SeekBarWaveformView;->invalidate()V

    .line 214
    :cond_27
    if-nez v0, :cond_31

    invoke-super {p0, p1}, Landroid/view/View;->onTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v2

    if-eqz v2, :cond_30

    goto :goto_31

    :cond_30
    const/4 v1, 0x0

    :cond_31
    :goto_31
    return v1
.end method

.method public setProgress(F)V
    .registers 3
    .param p1, "progress"    # F

    .line 197
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$SeekBarWaveformView;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$000(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/ui/components/SeekBarWaveform;

    move-result-object v0

    invoke-virtual {v0, p1}, Lim/tpelyyftgw/ui/components/SeekBarWaveform;->setProgress(F)V

    .line 198
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$SeekBarWaveformView;->invalidate()V

    .line 199
    return-void
.end method

.method public setWaveform([B)V
    .registers 3
    .param p1, "waveform"    # [B

    .line 192
    iget-object v0, p0, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$SeekBarWaveformView;->this$0:Lim/tpelyyftgw/ui/components/ChatActivityEnterView;

    invoke-static {v0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView;->access$000(Lim/tpelyyftgw/ui/components/ChatActivityEnterView;)Lim/tpelyyftgw/ui/components/SeekBarWaveform;

    move-result-object v0

    invoke-virtual {v0, p1}, Lim/tpelyyftgw/ui/components/SeekBarWaveform;->setWaveform([B)V

    .line 193
    invoke-virtual {p0}, Lim/tpelyyftgw/ui/components/ChatActivityEnterView$SeekBarWaveformView;->invalidate()V

    .line 194
    return-void
.end method