EclairGestureDetector.smali
.class public Luk/co/senab/photoview/gestures/EclairGestureDetector;
.super Luk/co/senab/photoview/gestures/CupcakeGestureDetector;
.source "EclairGestureDetector.java"
# 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 32
invoke-direct {p0, p1}, Luk/co/senab/photoview/gestures/CupcakeGestureDetector;-><init>(Landroid/content/Context;)V
const/4 p1, -0x1
.line 28
iput p1, p0, Luk/co/senab/photoview/gestures/EclairGestureDetector;->mActivePointerId:I
const/4 p1, 0x0
.line 29
iput p1, p0, Luk/co/senab/photoview/gestures/EclairGestureDetector;->mActivePointerIndex:I
return-void
.end method
# virtual methods
.method getActiveX(Landroid/view/MotionEvent;)F
.registers 3
.line 38
:try_start_0
iget v0, p0, Luk/co/senab/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 40
: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 47
:try_start_0
iget v0, p0, Luk/co/senab/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 49
: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 55
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 68
:cond_14
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
move-result v0
invoke-static {v0}, Luk/co/senab/photoview/Compat;->getPointerIndex(I)I
move-result v0
.line 69
invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->getPointerId(I)I
move-result v4
.line 70
iget v5, p0, Luk/co/senab/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 74
:goto_29
invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->getPointerId(I)I
move-result v4
iput v4, p0, Luk/co/senab/photoview/gestures/EclairGestureDetector;->mActivePointerId:I
.line 75
invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->getX(I)F
move-result v4
iput v4, p0, Luk/co/senab/photoview/gestures/EclairGestureDetector;->mLastTouchX:F
.line 76
invoke-virtual {p1, v0}, Landroid/view/MotionEvent;->getY(I)F
move-result v0
iput v0, p0, Luk/co/senab/photoview/gestures/EclairGestureDetector;->mLastTouchY:F
goto :goto_45
.line 62
:cond_3c
iput v1, p0, Luk/co/senab/photoview/gestures/EclairGestureDetector;->mActivePointerId:I
goto :goto_45
.line 58
:cond_3f
invoke-virtual {p1, v2}, Landroid/view/MotionEvent;->getPointerId(I)I
move-result v0
iput v0, p0, Luk/co/senab/photoview/gestures/EclairGestureDetector;->mActivePointerId:I
.line 81
:cond_45
:goto_45
iget v0, p0, Luk/co/senab/photoview/gestures/EclairGestureDetector;->mActivePointerId:I
if-eq v0, v1, :cond_4a
move v2, v0
.line 82
:cond_4a
invoke-virtual {p1, v2}, Landroid/view/MotionEvent;->findPointerIndex(I)I
move-result v0
iput v0, p0, Luk/co/senab/photoview/gestures/EclairGestureDetector;->mActivePointerIndex:I
.line 85
:try_start_50
invoke-super {p0, p1}, Luk/co/senab/photoview/gestures/CupcakeGestureDetector;->onTouchEvent(Landroid/view/MotionEvent;)Z
move-result p1
:try_end_54
.catch Ljava/lang/IllegalArgumentException; {:try_start_50 .. :try_end_54} :catch_55
return p1
:catch_55
return v3
.end method