今奥全景相机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1296 lines
30 KiB

.class public Lcom/viatech/gallery/ClipAudioBar;
.super Landroid/view/View;
.source "ClipAudioBar.java"
# interfaces
.implements Landroid/view/View$OnTouchListener;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/viatech/gallery/ClipAudioBar$OnTimeChangeListener;
}
.end annotation
# static fields
.field private static final HORIZONTALWIDTH_WIDTH:I = 0xa
.field private static final MAX_INTERVAL_TIME:J = 0x3b9aca00L
.field private static final MIN_INTERVAL_TIME:J = 0x2710L
.field private static final PROGRESS_WIDTH:I = 0x2
.field private static final TAG:Ljava/lang/String; = "CarSvc_ClipBarView"
.field private static final VERTICALWIDTH_WIDTH:I = 0x2
# instance fields
.field private mBarLeft:I
.field private mBarRight:I
.field private mDownLeft:Z
.field private mDownRight:Z
.field private mHorizontalWidth:I
.field private mLastX:I
.field private mMaxLength:I
.field private mMinLength:I
.field private mOnTimeChangeListener:Lcom/viatech/gallery/ClipAudioBar$OnTimeChangeListener;
.field private mPaint:Landroid/graphics/Paint;
.field private mProgressPostion:I
.field private mProgressWidth:I
.field private mTime:J
.field private mVerticalWidth:I
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.locals 3
.prologue
const/4 v2, 0x0
.line 41
invoke-direct {p0, p1}, Landroid/view/View;-><init>(Landroid/content/Context;)V
.line 26
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
.line 27
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mVerticalWidth:I
.line 28
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mProgressWidth:I
.line 29
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mProgressPostion:I
.line 30
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
.line 31
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
.line 32
iput-boolean v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mDownLeft:Z
.line 33
iput-boolean v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mDownRight:Z
.line 35
const-wide/16 v0, 0x0
iput-wide v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mTime:J
.line 36
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mMaxLength:I
.line 37
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mMinLength:I
.line 42
invoke-direct {p0}, Lcom/viatech/gallery/ClipAudioBar;->initView()V
.line 43
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 3
.prologue
const/4 v2, 0x0
.line 46
invoke-direct {p0, p1, p2}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.line 26
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
.line 27
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mVerticalWidth:I
.line 28
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mProgressWidth:I
.line 29
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mProgressPostion:I
.line 30
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
.line 31
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
.line 32
iput-boolean v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mDownLeft:Z
.line 33
iput-boolean v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mDownRight:Z
.line 35
const-wide/16 v0, 0x0
iput-wide v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mTime:J
.line 36
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mMaxLength:I
.line 37
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mMinLength:I
.line 47
invoke-direct {p0}, Lcom/viatech/gallery/ClipAudioBar;->initView()V
.line 48
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.locals 3
.prologue
const/4 v2, 0x0
.line 51
invoke-direct {p0, p1, p2, p3}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
.line 26
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
.line 27
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mVerticalWidth:I
.line 28
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mProgressWidth:I
.line 29
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mProgressPostion:I
.line 30
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
.line 31
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
.line 32
iput-boolean v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mDownLeft:Z
.line 33
iput-boolean v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mDownRight:Z
.line 35
const-wide/16 v0, 0x0
iput-wide v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mTime:J
.line 36
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mMaxLength:I
.line 37
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mMinLength:I
.line 52
invoke-direct {p0}, Lcom/viatech/gallery/ClipAudioBar;->initView()V
.line 53
return-void
.end method
.method private callOnTimeChangeListener()V
.locals 9
.prologue
const/high16 v8, 0x3f800000 # 1.0f
.line 250
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->getWidth()I
move-result v0
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
mul-int/lit8 v1, v1, 0x2
sub-int/2addr v0, v1
.line 251
iget-wide v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mTime:J
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
iget v4, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
sub-int/2addr v1, v4
int-to-long v4, v1
mul-long/2addr v2, v4
long-to-float v1, v2
mul-float/2addr v1, v8
int-to-float v2, v0
div-float/2addr v1, v2
float-to-long v2, v1
.line 252
iget-wide v4, p0, Lcom/viatech/gallery/ClipAudioBar;->mTime:J
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
iget v6, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
sub-int/2addr v1, v6
int-to-long v6, v1
mul-long/2addr v4, v6
long-to-float v1, v4
mul-float/2addr v1, v8
int-to-float v0, v0
div-float v0, v1, v0
float-to-long v0, v0
.line 253
iget-object v4, p0, Lcom/viatech/gallery/ClipAudioBar;->mOnTimeChangeListener:Lcom/viatech/gallery/ClipAudioBar$OnTimeChangeListener;
if-eqz v4, :cond_0
.line 254
iget-object v4, p0, Lcom/viatech/gallery/ClipAudioBar;->mOnTimeChangeListener:Lcom/viatech/gallery/ClipAudioBar$OnTimeChangeListener;
invoke-interface {v4, v2, v3, v0, v1}, Lcom/viatech/gallery/ClipAudioBar$OnTimeChangeListener;->onTimeChange(JJ)V
.line 255
:cond_0
return-void
.end method
.method private dip2px(Landroid/content/Context;F)I
.locals 2
.prologue
.line 228
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object v0
iget v0, v0, Landroid/util/DisplayMetrics;->density:F
.line 229
mul-float/2addr v0, p2
const/high16 v1, 0x3f000000 # 0.5f
add-float/2addr v0, v1
float-to-int v0, v0
return v0
.end method
.method private initView()V
.locals 2
.prologue
.line 220
new-instance v0, Landroid/graphics/Paint;
invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V
iput-object v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mPaint:Landroid/graphics/Paint;
.line 221
iget-object v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mPaint:Landroid/graphics/Paint;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V
.line 222
iget-object v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mPaint:Landroid/graphics/Paint;
sget-object v1, Landroid/graphics/Paint$Style;->FILL:Landroid/graphics/Paint$Style;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V
.line 224
invoke-virtual {p0, p0}, Lcom/viatech/gallery/ClipAudioBar;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V
.line 225
return-void
.end method
.method private isInLeftRect(II)Z
.locals 5
.prologue
.line 233
new-instance v0, Landroid/graphics/Rect;
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
iget v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
sub-int/2addr v1, v2
const/4 v2, 0x0
iget v3, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->getHeight()I
move-result v4
invoke-direct {v0, v1, v2, v3, v4}, Landroid/graphics/Rect;-><init>(IIII)V
.line 234
invoke-direct {p0, v0, p1, p2}, Lcom/viatech/gallery/ClipAudioBar;->isInRect(Landroid/graphics/Rect;II)Z
move-result v0
return v0
.end method
.method private isInRect(Landroid/graphics/Rect;II)Z
.locals 2
.prologue
.line 243
iget v0, p1, Landroid/graphics/Rect;->left:I
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
sub-int/2addr v0, v1
if-lt p2, v0, :cond_0
iget v0, p1, Landroid/graphics/Rect;->right:I
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
add-int/2addr v0, v1
if-gt p2, v0, :cond_0
iget v0, p1, Landroid/graphics/Rect;->top:I
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
sub-int/2addr v0, v1
if-lt p3, v0, :cond_0
iget v0, p1, Landroid/graphics/Rect;->bottom:I
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
add-int/2addr v0, v1
if-gt p3, v0, :cond_0
.line 245
const/4 v0, 0x1
.line 246
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method private isInRightRect(II)Z
.locals 5
.prologue
.line 238
new-instance v0, Landroid/graphics/Rect;
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
const/4 v2, 0x0
iget v3, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
iget v4, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
add-int/2addr v3, v4
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->getHeight()I
move-result v4
invoke-direct {v0, v1, v2, v3, v4}, Landroid/graphics/Rect;-><init>(IIII)V
.line 239
invoke-direct {p0, v0, p1, p2}, Lcom/viatech/gallery/ClipAudioBar;->isInRect(Landroid/graphics/Rect;II)Z
move-result v0
return v0
.end method
# virtual methods
.method protected onDraw(Landroid/graphics/Canvas;)V
.locals 7
.annotation build Landroid/annotation/SuppressLint;
value = {
"DrawAllocation"
}
.end annotation
.prologue
const/4 v6, 0x0
const/high16 v4, 0x40000000 # 2.0f
.line 89
invoke-super {p0, p1}, Landroid/view/View;->onDraw(Landroid/graphics/Canvas;)V
.line 91
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->getWidth()I
move-result v0
.line 92
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->getHeight()I
move-result v1
.line 93
if-eqz v0, :cond_0
if-nez v1, :cond_1
.line 145
:cond_0
:goto_0
return-void
.line 96
:cond_1
iget v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
if-nez v2, :cond_2
iget v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mVerticalWidth:I
if-nez v2, :cond_2
.line 97
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->getContext()Landroid/content/Context;
move-result-object v2
const/high16 v3, 0x41200000 # 10.0f
invoke-direct {p0, v2, v3}, Lcom/viatech/gallery/ClipAudioBar;->dip2px(Landroid/content/Context;F)I
move-result v2
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
.line 98
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->getContext()Landroid/content/Context;
move-result-object v2
invoke-direct {p0, v2, v4}, Lcom/viatech/gallery/ClipAudioBar;->dip2px(Landroid/content/Context;F)I
move-result v2
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mVerticalWidth:I
.line 99
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->getContext()Landroid/content/Context;
move-result-object v2
invoke-direct {p0, v2, v4}, Lcom/viatech/gallery/ClipAudioBar;->dip2px(Landroid/content/Context;F)I
move-result v2
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mProgressWidth:I
.line 102
:cond_2
iget v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
if-nez v2, :cond_3
iget v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
if-nez v2, :cond_3
.line 103
iget v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
.line 104
iget v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
sub-int v2, v0, v2
iput v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
.line 107
:cond_3
iget-object v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mPaint:Landroid/graphics/Paint;
const v3, -0xa98804
invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setColor(I)V
.line 110
new-instance v2, Landroid/graphics/Rect;
iget v3, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
iget v4, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
sub-int/2addr v3, v4
iget v4, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
invoke-direct {v2, v3, v6, v4, v1}, Landroid/graphics/Rect;-><init>(IIII)V
.line 111
iget-object v3, p0, Lcom/viatech/gallery/ClipAudioBar;->mPaint:Landroid/graphics/Paint;
invoke-virtual {p1, v2, v3}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/Rect;Landroid/graphics/Paint;)V
.line 121
new-instance v2, Landroid/graphics/Rect;
div-int/lit8 v3, v1, 0x2
iget v4, p0, Lcom/viatech/gallery/ClipAudioBar;->mVerticalWidth:I
div-int/lit8 v4, v4, 0x2
sub-int/2addr v3, v4
iget v4, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
sub-int/2addr v0, v4
div-int/lit8 v4, v1, 0x2
iget v5, p0, Lcom/viatech/gallery/ClipAudioBar;->mVerticalWidth:I
div-int/lit8 v5, v5, 0x2
add-int/2addr v4, v5
invoke-direct {v2, v6, v3, v0, v4}, Landroid/graphics/Rect;-><init>(IIII)V
.line 122
iget-object v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mPaint:Landroid/graphics/Paint;
invoke-virtual {p1, v2, v0}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/Rect;Landroid/graphics/Paint;)V
.line 129
iget-object v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mPaint:Landroid/graphics/Paint;
const/high16 v2, -0x10000
invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setColor(I)V
.line 130
new-instance v0, Landroid/graphics/Rect;
iget v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mProgressPostion:I
iget v3, p0, Lcom/viatech/gallery/ClipAudioBar;->mVerticalWidth:I
iget v4, p0, Lcom/viatech/gallery/ClipAudioBar;->mProgressPostion:I
iget v5, p0, Lcom/viatech/gallery/ClipAudioBar;->mProgressWidth:I
add-int/2addr v4, v5
iget v5, p0, Lcom/viatech/gallery/ClipAudioBar;->mVerticalWidth:I
sub-int/2addr v1, v5
invoke-direct {v0, v2, v3, v4, v1}, Landroid/graphics/Rect;-><init>(IIII)V
.line 131
iget-object v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mPaint:Landroid/graphics/Paint;
invoke-virtual {p1, v0, v1}, Landroid/graphics/Canvas;->drawRect(Landroid/graphics/Rect;Landroid/graphics/Paint;)V
goto/16 :goto_0
.end method
.method public onTouch(Landroid/view/View;Landroid/view/MotionEvent;)Z
.locals 5
.prologue
const/4 v4, 0x1
const/4 v2, 0x0
.line 149
invoke-virtual {p2}, Landroid/view/MotionEvent;->getAction()I
move-result v0
packed-switch v0, :pswitch_data_0
.line 216
:cond_0
:goto_0
return v4
.line 151
:pswitch_0
invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F
move-result v0
float-to-int v0, v0
invoke-virtual {p2}, Landroid/view/MotionEvent;->getY()F
move-result v1
float-to-int v1, v1
invoke-direct {p0, v0, v1}, Lcom/viatech/gallery/ClipAudioBar;->isInLeftRect(II)Z
move-result v0
if-eqz v0, :cond_2
.line 152
iput-boolean v4, p0, Lcom/viatech/gallery/ClipAudioBar;->mDownLeft:Z
.line 157
:cond_1
:goto_1
iput-boolean v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mDownRight:Z
.line 158
invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F
move-result v0
float-to-int v0, v0
iput v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mLastX:I
.line 159
const-string v0, "CarSvc_ClipBarView"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "mDownLeft = "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
iget-boolean v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mDownLeft:Z
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 160
const-string v0, "CarSvc_ClipBarView"
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "mDownRight = "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
iget-boolean v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mDownRight:Z
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_0
.line 153
:cond_2
invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F
move-result v0
float-to-int v0, v0
invoke-virtual {p2}, Landroid/view/MotionEvent;->getY()F
move-result v1
float-to-int v1, v1
invoke-direct {p0, v0, v1}, Lcom/viatech/gallery/ClipAudioBar;->isInRightRect(II)Z
move-result v0
if-eqz v0, :cond_1
.line 154
iput-boolean v4, p0, Lcom/viatech/gallery/ClipAudioBar;->mDownRight:Z
goto :goto_1
.line 163
:pswitch_1
iget-wide v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mTime:J
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-eqz v0, :cond_0
.line 166
iget-boolean v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mDownLeft:Z
if-eqz v0, :cond_8
.line 167
invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F
move-result v0
float-to-int v0, v0
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mLastX:I
sub-int/2addr v0, v1
.line 168
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
add-int/2addr v0, v1
iput v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
.line 169
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
if-ge v0, v1, :cond_3
.line 170
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
iput v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
.line 172
:cond_3
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->getWidth()I
move-result v1
iget v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mMinLength:I
sub-int/2addr v1, v2
iget v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
sub-int/2addr v1, v2
if-le v0, v1, :cond_4
.line 173
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->getWidth()I
move-result v0
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mMinLength:I
sub-int/2addr v0, v1
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
sub-int/2addr v0, v1
iput v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
.line 175
:cond_4
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
sub-int/2addr v0, v1
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mMaxLength:I
if-le v0, v1, :cond_7
.line 176
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mMaxLength:I
add-int/2addr v0, v1
iput v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
.line 181
:cond_5
:goto_2
invoke-direct {p0}, Lcom/viatech/gallery/ClipAudioBar;->callOnTimeChangeListener()V
.line 182
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->invalidate()V
.line 202
:cond_6
:goto_3
invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F
move-result v0
float-to-int v0, v0
iput v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mLastX:I
goto/16 :goto_0
.line 177
:cond_7
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
sub-int/2addr v0, v1
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mMinLength:I
if-ge v0, v1, :cond_5
.line 178
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mMinLength:I
add-int/2addr v0, v1
iput v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
goto :goto_2
.line 183
:cond_8
iget-boolean v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mDownRight:Z
if-eqz v0, :cond_6
.line 184
invoke-virtual {p2}, Landroid/view/MotionEvent;->getX()F
move-result v0
float-to-int v0, v0
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mLastX:I
sub-int/2addr v0, v1
.line 185
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
add-int/2addr v0, v1
iput v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
.line 187
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->getWidth()I
move-result v1
iget v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
sub-int/2addr v1, v2
if-le v0, v1, :cond_9
.line 188
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->getWidth()I
move-result v0
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
sub-int/2addr v0, v1
iput v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
.line 190
:cond_9
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mMinLength:I
iget v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
add-int/2addr v1, v2
if-ge v0, v1, :cond_a
.line 191
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mMinLength:I
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
add-int/2addr v0, v1
iput v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
.line 193
:cond_a
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
sub-int/2addr v0, v1
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mMaxLength:I
if-le v0, v1, :cond_c
.line 194
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mMaxLength:I
sub-int/2addr v0, v1
iput v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
.line 199
:cond_b
:goto_4
invoke-direct {p0}, Lcom/viatech/gallery/ClipAudioBar;->callOnTimeChangeListener()V
.line 200
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->invalidate()V
goto :goto_3
.line 195
:cond_c
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
sub-int/2addr v0, v1
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mMinLength:I
if-ge v0, v1, :cond_b
.line 196
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mMinLength:I
sub-int/2addr v0, v1
iput v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
goto :goto_4
.line 205
:pswitch_2
iget-boolean v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mDownLeft:Z
if-eqz v0, :cond_e
.line 206
iget-object v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mOnTimeChangeListener:Lcom/viatech/gallery/ClipAudioBar$OnTimeChangeListener;
if-eqz v0, :cond_d
.line 207
iget-object v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mOnTimeChangeListener:Lcom/viatech/gallery/ClipAudioBar$OnTimeChangeListener;
invoke-interface {v0}, Lcom/viatech/gallery/ClipAudioBar$OnTimeChangeListener;->onBarLeftUp()V
.line 212
:cond_d
:goto_5
iput-boolean v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mDownLeft:Z
.line 213
iput-boolean v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mDownRight:Z
goto/16 :goto_0
.line 208
:cond_e
iget-boolean v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mDownRight:Z
if-eqz v0, :cond_d
.line 209
iget-object v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mOnTimeChangeListener:Lcom/viatech/gallery/ClipAudioBar$OnTimeChangeListener;
if-eqz v0, :cond_d
.line 210
iget-object v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mOnTimeChangeListener:Lcom/viatech/gallery/ClipAudioBar$OnTimeChangeListener;
invoke-interface {v0}, Lcom/viatech/gallery/ClipAudioBar$OnTimeChangeListener;->onBarRightUp()V
goto :goto_5
.line 149
:pswitch_data_0
.packed-switch 0x0
:pswitch_0
:pswitch_2
:pswitch_1
.end packed-switch
.end method
.method public setOnTimeChangeListener(Lcom/viatech/gallery/ClipAudioBar$OnTimeChangeListener;)V
.locals 0
.prologue
.line 56
iput-object p1, p0, Lcom/viatech/gallery/ClipAudioBar;->mOnTimeChangeListener:Lcom/viatech/gallery/ClipAudioBar$OnTimeChangeListener;
.line 57
return-void
.end method
.method public setProgressTime(J)V
.locals 5
.prologue
.line 79
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
if-eqz v0, :cond_0
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mVerticalWidth:I
if-eqz v0, :cond_0
.line 80
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->getWidth()I
move-result v0
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
mul-int/lit8 v1, v1, 0x2
sub-int/2addr v0, v1
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mProgressWidth:I
sub-int/2addr v0, v1
.line 81
int-to-long v0, v0
mul-long/2addr v0, p1
long-to-float v0, v0
const/high16 v1, 0x3f800000 # 1.0f
mul-float/2addr v0, v1
iget-wide v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mTime:J
long-to-float v1, v2
div-float/2addr v0, v1
float-to-int v0, v0
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
add-int/2addr v0, v1
iput v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mProgressPostion:I
.line 83
:cond_0
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->invalidate()V
.line 84
return-void
.end method
.method public setTimeLength(J)V
.locals 7
.prologue
const/high16 v6, 0x3f800000 # 1.0f
.line 60
iput-wide p1, p0, Lcom/viatech/gallery/ClipAudioBar;->mTime:J
.line 61
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
if-eqz v0, :cond_2
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mVerticalWidth:I
if-eqz v0, :cond_2
.line 62
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->getWidth()I
move-result v0
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
mul-int/lit8 v1, v1, 0x2
sub-int/2addr v0, v1
.line 63
int-to-long v2, v0
const-wide/32 v4, 0x3b9aca00
mul-long/2addr v2, v4
long-to-float v1, v2
mul-float/2addr v1, v6
iget-wide v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mTime:J
long-to-float v2, v2
div-float/2addr v1, v2
float-to-int v1, v1
iput v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mMaxLength:I
.line 64
int-to-long v2, v0
const-wide/16 v4, 0x2710
mul-long/2addr v2, v4
long-to-float v1, v2
mul-float/2addr v1, v6
iget-wide v2, p0, Lcom/viatech/gallery/ClipAudioBar;->mTime:J
long-to-float v2, v2
div-float/2addr v1, v2
float-to-int v1, v1
iput v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mMinLength:I
.line 65
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mMaxLength:I
if-le v1, v0, :cond_0
.line 66
iput v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mMaxLength:I
.line 67
:cond_0
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mMinLength:I
if-le v1, v0, :cond_1
.line 68
iput v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mMinLength:I
.line 70
:cond_1
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mHorizontalWidth:I
iput v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
.line 71
iget v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarLeft:I
iget v1, p0, Lcom/viatech/gallery/ClipAudioBar;->mMaxLength:I
add-int/2addr v0, v1
iput v0, p0, Lcom/viatech/gallery/ClipAudioBar;->mBarRight:I
.line 73
invoke-direct {p0}, Lcom/viatech/gallery/ClipAudioBar;->callOnTimeChangeListener()V
.line 74
invoke-virtual {p0}, Lcom/viatech/gallery/ClipAudioBar;->invalidate()V
.line 76
:cond_2
return-void
.end method