EclairGestureDetector.smali
.class public Lio/rong/photoview/gestures/EclairGestureDetector;
.super Lio/rong/photoview/gestures/CupcakeGestureDetector;
.source "EclairGestureDetector.java"
# annotations
.annotation build Landroid/annotation/TargetApi;
value = 0x5
.end annotation
# static fields
.field private static final INVALID_POINTER_ID:I = -0x1
# instance fields
.field private mActivePointerId:I
.field private mActivePointerIndex:I
# direct methods
.method public constructor <init>(Landroid/content/Context;)V
.registers 2
.line 1
invoke-direct {p0, p1}, Lio/rong/photoview/gestures/CupcakeGestureDetector;-><init>(Landroid/content/Context;)V
const/4 p1, -0x1
.line 2
iput p1, p0, Lio/rong/photoview/gestures/EclairGestureDetector;->mActivePointerId:I
const/4 p1, 0x0
.line 3
iput p1, p0, Lio/rong/photoview/gestures/EclairGestureDetector;->mActivePointerIndex:I
return-void
.end method
# virtual methods
.method getActiveX(Landroid/view/MotionEvent;)F
.registers 3
.line 1
:try_start_0
iget v0, p0, Lio/rong/photoview/gestures/EclairGestureDetector;->mActivePointerIndex:I
invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->getX(I)F
move-result p1
:try_end_6
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_6} :catch_7
return p1
.line 2
:catch_7
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result p1
return p1
.end method
.method getActiveY(Landroid/view/MotionEvent;)F
.registers 3
.line 1
:try_start_0
iget v0, p0, Lio/rong/photoview/gestures/EclairGestureDetector;->mActivePointerIndex:I
invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->getY(I)F
move-result p1
:try_end_6
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_6} :catch_7
return p1
.line 2
:catch_7
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
move-result p1
return p1
.end method
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
.registers 8
.line 1
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
move-result v0
and-int/lit16 v0, v0, 0xff
const/4 v1, -0x1
const/4 v2, 0x0
const/4 v3, 0x1
if-eqz v0, :cond_3f
if-eq v0, v3, :cond_3c
const/4 v4, 0x3
if-eq v0, v4, :cond_3c
const/4 v4, 0x6
if-eq v0, v4, :cond_14
goto :goto_45
.line 2
:cond_14
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
move-result v0
invoke-static {v0}, Lio/rong/photoview/Compat;->getPointerIndex(I)I
move-result v0
.line 3
invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->getPointerId(I)I
move-result v4
.line 4
iget v5, p0, Lio/rong/photoview/gestures/EclairGestureDetector;->mActivePointerId:I
if-ne v4, v5, :cond_45
if-nez v0, :cond_28
const/4 v0, 0x1
goto :goto_29
:cond_28
const/4 v0, 0x0
.line 5
:goto_29
invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->getPointerId(I)I
move-result v4
iput v4, p0, Lio/rong/photoview/gestures/EclairGestureDetector;->mActivePointerId:I
.line 6
invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->getX(I)F
move-result v4
iput v4, p0, Lio/rong/photoview/gestures/CupcakeGestureDetector;->mLastTouchX:F
.line 7
invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->getY(I)F
move-result v0
iput v0, p0, Lio/rong/photoview/gestures/CupcakeGestureDetector;->mLastTouchY:F
goto :goto_45
.line 8
:cond_3c
iput v1, p0, Lio/rong/photoview/gestures/EclairGestureDetector;->mActivePointerId:I
goto :goto_45
.line 9
:cond_3f
invoke-virtual {p1, v2}, Landroid/view/MotionEvent;->getPointerId(I)I
move-result v0
iput v0, p0, Lio/rong/photoview/gestures/EclairGestureDetector;->mActivePointerId:I
.line 10
:cond_45
:goto_45
iget v0, p0, Lio/rong/photoview/gestures/EclairGestureDetector;->mActivePointerId:I
if-eq v0, v1, :cond_4a
goto :goto_4b
:cond_4a
const/4 v0, 0x0
.line 11
:goto_4b
invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->findPointerIndex(I)I
move-result v0
iput v0, p0, Lio/rong/photoview/gestures/EclairGestureDetector;->mActivePointerIndex:I
.line 12
:try_start_51
invoke-super {p0, p1}, Lio/rong/photoview/gestures/CupcakeGestureDetector;->onTouchEvent(Landroid/view/MotionEvent;)Z
move-result p1
:try_end_55
.catch Ljava/lang/IllegalArgumentException; {:try_start_51 .. :try_end_55} :catch_56
return p1
:catch_56
return v3
.end method