2019-02-04 20:08:30 +00:00
|
|
|
.class Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;
|
|
|
|
.super Landroid/view/TouchDelegate;
|
2019-02-04 20:29:01 +00:00
|
|
|
.source "SearchView.java"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Landroidx/appcompat/widget/SearchView;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x8
|
|
|
|
name = "UpdatableTouchDelegate"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field private final mActualBounds:Landroid/graphics/Rect;
|
|
|
|
|
|
|
|
.field private mDelegateTargeted:Z
|
|
|
|
|
|
|
|
.field private final mDelegateView:Landroid/view/View;
|
|
|
|
|
|
|
|
.field private final mSlop:I
|
|
|
|
|
|
|
|
.field private final mSlopBounds:Landroid/graphics/Rect;
|
|
|
|
|
|
|
|
.field private final mTargetBounds:Landroid/graphics/Rect;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Landroid/graphics/Rect;Landroid/graphics/Rect;Landroid/view/View;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p3}, Landroid/view/TouchDelegate;-><init>(Landroid/graphics/Rect;Landroid/view/View;)V
|
|
|
|
|
|
|
|
invoke-virtual {p3}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {v0}, Landroid/view/ViewConfiguration;->get(Landroid/content/Context;)Landroid/view/ViewConfiguration;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroid/view/ViewConfiguration;->getScaledTouchSlop()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
iput v0, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mSlop:I
|
|
|
|
|
|
|
|
new-instance v0, Landroid/graphics/Rect;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
|
|
|
|
|
|
|
|
iput-object v0, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mTargetBounds:Landroid/graphics/Rect;
|
|
|
|
|
|
|
|
new-instance v0, Landroid/graphics/Rect;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
|
|
|
|
|
|
|
|
iput-object v0, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mSlopBounds:Landroid/graphics/Rect;
|
|
|
|
|
|
|
|
new-instance v0, Landroid/graphics/Rect;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
|
|
|
|
|
|
|
|
iput-object v0, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mActualBounds:Landroid/graphics/Rect;
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2}, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->setBounds(Landroid/graphics/Rect;Landroid/graphics/Rect;)V
|
|
|
|
|
|
|
|
iput-object p3, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mDelegateView:Landroid/view/View;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
|
2019-05-03 18:53:54 +00:00
|
|
|
.locals 7
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
float-to-int v0, v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
float-to-int v1, v1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
const/4 v3, 0x2
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
const/4 v4, 0x1
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
|
|
|
|
if-eq v2, v4, :cond_1
|
|
|
|
|
|
|
|
if-eq v2, v3, :cond_1
|
|
|
|
|
|
|
|
const/4 v6, 0x3
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
if-eq v2, v6, :cond_0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
:cond_0
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-boolean v2, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mDelegateTargeted:Z
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
iput-boolean v5, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mDelegateTargeted:Z
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
:cond_1
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-boolean v2, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mDelegateTargeted:Z
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
if-eqz v2, :cond_4
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
iget-object v6, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mSlopBounds:Landroid/graphics/Rect;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
invoke-virtual {v6, v0, v1}, Landroid/graphics/Rect;->contains(II)Z
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
move-result v6
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
if-nez v6, :cond_4
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
const/4 v4, 0x0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
:cond_2
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v2, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mTargetBounds:Landroid/graphics/Rect;
|
|
|
|
|
|
|
|
invoke-virtual {v2, v0, v1}, Landroid/graphics/Rect;->contains(II)Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
if-eqz v2, :cond_3
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
iput-boolean v4, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mDelegateTargeted:Z
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
:cond_3
|
2019-02-04 20:08:30 +00:00
|
|
|
:goto_0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
:cond_4
|
2019-02-04 20:08:30 +00:00
|
|
|
:goto_1
|
2019-05-03 18:53:54 +00:00
|
|
|
if-eqz v2, :cond_6
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
if-eqz v4, :cond_5
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
iget-object v2, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mActualBounds:Landroid/graphics/Rect;
|
|
|
|
|
|
|
|
invoke-virtual {v2, v0, v1}, Landroid/graphics/Rect;->contains(II)Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
if-nez v2, :cond_5
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mDelegateView:Landroid/view/View;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroid/view/View;->getWidth()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
div-int/2addr v0, v3
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
int-to-float v0, v0
|
|
|
|
|
|
|
|
iget-object v1, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mDelegateView:Landroid/view/View;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Landroid/view/View;->getHeight()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
div-int/2addr v1, v3
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
int-to-float v1, v1
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0, v1}, Landroid/view/MotionEvent;->setLocation(FF)V
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
goto :goto_2
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
:cond_5
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v2, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mActualBounds:Landroid/graphics/Rect;
|
|
|
|
|
|
|
|
iget v2, v2, Landroid/graphics/Rect;->left:I
|
|
|
|
|
|
|
|
sub-int/2addr v0, v2
|
|
|
|
|
|
|
|
int-to-float v0, v0
|
|
|
|
|
|
|
|
iget-object v2, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mActualBounds:Landroid/graphics/Rect;
|
|
|
|
|
|
|
|
iget v2, v2, Landroid/graphics/Rect;->top:I
|
|
|
|
|
|
|
|
sub-int/2addr v1, v2
|
|
|
|
|
|
|
|
int-to-float v1, v1
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0, v1}, Landroid/view/MotionEvent;->setLocation(FF)V
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
:goto_2
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mDelegateView:Landroid/view/View;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Landroid/view/View;->dispatchTouchEvent(Landroid/view/MotionEvent;)Z
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
move-result v5
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
:cond_6
|
|
|
|
return v5
|
2019-02-04 20:08:30 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public setBounds(Landroid/graphics/Rect;Landroid/graphics/Rect;)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mTargetBounds:Landroid/graphics/Rect;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Landroid/graphics/Rect;->set(Landroid/graphics/Rect;)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mSlopBounds:Landroid/graphics/Rect;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Landroid/graphics/Rect;->set(Landroid/graphics/Rect;)V
|
|
|
|
|
|
|
|
iget-object p1, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mSlopBounds:Landroid/graphics/Rect;
|
|
|
|
|
|
|
|
iget v0, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mSlop:I
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
neg-int v1, v0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
neg-int v0, v0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-virtual {p1, v1, v0}, Landroid/graphics/Rect;->inset(II)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
iget-object p1, p0, Landroidx/appcompat/widget/SearchView$UpdatableTouchDelegate;->mActualBounds:Landroid/graphics/Rect;
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Landroid/graphics/Rect;->set(Landroid/graphics/Rect;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|