InterceptFrameLayout.smali

.class public Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;
.super Landroid/widget/FrameLayout;
.source "SourceFile"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout$a;
    }
.end annotation


# static fields
.field private static final c:F

.field private static final d:Ljava/lang/String;


# instance fields
.field public a:F

.field public b:Z

.field private e:F

.field private f:Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout$a;


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

    const/16 v0, 0x1e

    .line 17
    invoke-static {v0}, Lcom/masala/share/utils/l;->a(I)I

    move-result v0

    int-to-float v0, v0

    sput v0, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;->c:F

    .line 18
    const-class v0, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;->d:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .registers 2

    .line 26
    invoke-direct {p0, p1}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;)V

    const/4 p1, 0x0

    .line 23
    iput-boolean p1, p0, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;->b:Z

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .registers 3

    .line 30
    invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    const/4 p1, 0x0

    .line 23
    iput-boolean p1, p0, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;->b:Z

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .registers 4

    .line 34
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const/4 p1, 0x0

    .line 23
    iput-boolean p1, p0, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;->b:Z

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V
    .registers 5

    .line 39
    invoke-direct {p0, p1, p2, p3, p4}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;II)V

    const/4 p1, 0x0

    .line 23
    iput-boolean p1, p0, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;->b:Z

    return-void
.end method


# virtual methods
.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
    .registers 9

    .line 60
    iget-boolean v0, p0, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;->b:Z

    const/4 v1, 0x1

    if-eqz v0, :cond_6

    return v1

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

    move-result v0

    if-eqz v0, :cond_5f

    const/4 v2, 0x2

    if-eq v0, v2, :cond_10

    goto :goto_6b

    .line 70
    :cond_10
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getPointerCount()I

    move-result v0

    if-lez v0, :cond_6b

    .line 71
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F

    move-result v0

    iget v2, p0, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;->a:F

    sub-float/2addr v0, v2

    .line 72
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawX()F

    move-result v2

    iget v3, p0, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;->e:F

    sub-float/2addr v2, v3

    .line 74
    invoke-static {v2}, Ljava/lang/Math;->abs(F)F

    move-result v3

    sget v4, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;->c:F

    cmpl-float v3, v3, v4

    if-lez v3, :cond_6b

    invoke-static {v0}, Ljava/lang/Math;->abs(F)F

    move-result v0

    float-to-double v3, v0

    const-wide v5, 0x3ff6d916872b020cL    # 1.428

    invoke-static {v3, v4}, Ljava/lang/Double;->isNaN(D)Z

    mul-double v3, v3, v5

    invoke-static {v2}, Ljava/lang/Math;->abs(F)F

    move-result v0

    float-to-double v5, v0

    cmpg-double v0, v3, v5

    if-gez v0, :cond_6b

    const/4 p1, 0x0

    cmpl-float v0, v2, p1

    if-lez v0, :cond_53

    .line 77
    iget-object p1, p0, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;->f:Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout$a;

    if-eqz p1, :cond_5e

    .line 78
    invoke-interface {p1}, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout$a;->c()V

    goto :goto_5e

    :cond_53
    cmpg-float p1, v2, p1

    if-gez p1, :cond_5e

    .line 82
    iget-object p1, p0, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;->f:Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout$a;

    if-eqz p1, :cond_5e

    .line 83
    invoke-interface {p1}, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout$a;->b()V

    :cond_5e
    :goto_5e
    return v1

    .line 66
    :cond_5f
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawX()F

    move-result v0

    iput v0, p0, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;->e:F

    .line 67
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F

    move-result v0

    iput v0, p0, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;->a:F

    .line 94
    :cond_6b
    :goto_6b
    invoke-super {p0, p1}, Landroid/widget/FrameLayout;->onInterceptTouchEvent(Landroid/view/MotionEvent;)Z

    move-result p1

    return p1
.end method

.method public setGestureListener(Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout$a;)V
    .registers 2

    .line 51
    iput-object p1, p0, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;->f:Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout$a;

    return-void
.end method

.method public setIntercept(Z)V
    .registers 2

    .line 55
    iput-boolean p1, p0, Lcom/imo/android/imoim/feeds/ui/views/InterceptFrameLayout;->b:Z

    return-void
.end method