484 lines
13 KiB
Smali
484 lines
13 KiB
Smali
|
.class public Landroidx/appcompat/widget/SearchView$SearchAutoComplete;
|
||
|
.super Landroidx/appcompat/widget/AppCompatAutoCompleteTextView;
|
||
|
.source "SearchView.java"
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
||
|
value = Landroidx/appcompat/widget/SearchView;
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/InnerClass;
|
||
|
accessFlags = 0x9
|
||
|
name = "SearchAutoComplete"
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field private mHasPendingShowSoftInputRequest:Z
|
||
|
|
||
|
.field final mRunShowSoftInputIfNecessary:Ljava/lang/Runnable;
|
||
|
|
||
|
.field private mSearchView:Landroidx/appcompat/widget/SearchView;
|
||
|
|
||
|
.field private mThreshold:I
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method public constructor <init>(Landroid/content/Context;)V
|
||
|
.locals 1
|
||
|
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
invoke-direct {p0, p1, v0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
||
|
.locals 1
|
||
|
|
||
|
sget v0, Landroidx/appcompat/R$attr;->autoCompleteTextViewStyle:I
|
||
|
|
||
|
invoke-direct {p0, p1, p2, v0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
||
|
.locals 0
|
||
|
|
||
|
invoke-direct {p0, p1, p2, p3}, Landroidx/appcompat/widget/AppCompatAutoCompleteTextView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
||
|
|
||
|
new-instance p1, Landroidx/appcompat/widget/SearchView$SearchAutoComplete$1;
|
||
|
|
||
|
invoke-direct {p1, p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete$1;-><init>(Landroidx/appcompat/widget/SearchView$SearchAutoComplete;)V
|
||
|
|
||
|
iput-object p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mRunShowSoftInputIfNecessary:Ljava/lang/Runnable;
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->getThreshold()I
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
iput p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mThreshold:I
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method private getSearchViewTextMinWidthDp()I
|
||
|
.locals 4
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->getResources()Landroid/content/res/Resources;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
iget v1, v0, Landroid/content/res/Configuration;->screenWidthDp:I
|
||
|
|
||
|
iget v2, v0, Landroid/content/res/Configuration;->screenHeightDp:I
|
||
|
|
||
|
const/16 v3, 0x3c0
|
||
|
|
||
|
if-lt v1, v3, :cond_0
|
||
|
|
||
|
const/16 v3, 0x2d0
|
||
|
|
||
|
if-lt v2, v3, :cond_0
|
||
|
|
||
|
iget v0, v0, Landroid/content/res/Configuration;->orientation:I
|
||
|
|
||
|
const/4 v3, 0x2
|
||
|
|
||
|
if-ne v0, v3, :cond_0
|
||
|
|
||
|
const/16 v0, 0x100
|
||
|
|
||
|
return v0
|
||
|
|
||
|
:cond_0
|
||
|
const/16 v0, 0x258
|
||
|
|
||
|
if-ge v1, v0, :cond_2
|
||
|
|
||
|
const/16 v0, 0x280
|
||
|
|
||
|
if-lt v1, v0, :cond_1
|
||
|
|
||
|
const/16 v0, 0x1e0
|
||
|
|
||
|
if-lt v2, v0, :cond_1
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_1
|
||
|
const/16 v0, 0xa0
|
||
|
|
||
|
return v0
|
||
|
|
||
|
:cond_2
|
||
|
:goto_0
|
||
|
const/16 v0, 0xc0
|
||
|
|
||
|
return v0
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public enoughToFilter()Z
|
||
|
.locals 1
|
||
|
|
||
|
iget v0, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mThreshold:I
|
||
|
|
||
|
if-lez v0, :cond_1
|
||
|
|
||
|
invoke-super {p0}, Landroidx/appcompat/widget/AppCompatAutoCompleteTextView;->enoughToFilter()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_0
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
return v0
|
||
|
|
||
|
:cond_1
|
||
|
:goto_0
|
||
|
const/4 v0, 0x1
|
||
|
|
||
|
return v0
|
||
|
.end method
|
||
|
|
||
|
.method isEmpty()Z
|
||
|
.locals 1
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->getText()Landroid/text/Editable;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {v0}, Landroid/text/TextUtils;->getTrimmedLength(Ljava/lang/CharSequence;)I
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-nez v0, :cond_0
|
||
|
|
||
|
const/4 v0, 0x1
|
||
|
|
||
|
return v0
|
||
|
|
||
|
:cond_0
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
return v0
|
||
|
.end method
|
||
|
|
||
|
.method public onCreateInputConnection(Landroid/view/inputmethod/EditorInfo;)Landroid/view/inputmethod/InputConnection;
|
||
|
.locals 1
|
||
|
|
||
|
invoke-super {p0, p1}, Landroidx/appcompat/widget/AppCompatAutoCompleteTextView;->onCreateInputConnection(Landroid/view/inputmethod/EditorInfo;)Landroid/view/inputmethod/InputConnection;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
iget-boolean v0, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mHasPendingShowSoftInputRequest:Z
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
iget-object v0, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mRunShowSoftInputIfNecessary:Ljava/lang/Runnable;
|
||
|
|
||
|
invoke-virtual {p0, v0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->removeCallbacks(Ljava/lang/Runnable;)Z
|
||
|
|
||
|
iget-object v0, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mRunShowSoftInputIfNecessary:Ljava/lang/Runnable;
|
||
|
|
||
|
invoke-virtual {p0, v0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->post(Ljava/lang/Runnable;)Z
|
||
|
|
||
|
:cond_0
|
||
|
return-object p1
|
||
|
.end method
|
||
|
|
||
|
.method protected onFinishInflate()V
|
||
|
.locals 3
|
||
|
|
||
|
invoke-super {p0}, Landroidx/appcompat/widget/AppCompatAutoCompleteTextView;->onFinishInflate()V
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->getResources()Landroid/content/res/Resources;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-direct {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->getSearchViewTextMinWidthDp()I
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
int-to-float v1, v1
|
||
|
|
||
|
const/4 v2, 0x1
|
||
|
|
||
|
invoke-static {v2, v1, v0}, Landroid/util/TypedValue;->applyDimension(IFLandroid/util/DisplayMetrics;)F
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
float-to-int v0, v0
|
||
|
|
||
|
invoke-virtual {p0, v0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->setMinWidth(I)V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method protected onFocusChanged(ZILandroid/graphics/Rect;)V
|
||
|
.locals 0
|
||
|
|
||
|
invoke-super {p0, p1, p2, p3}, Landroidx/appcompat/widget/AppCompatAutoCompleteTextView;->onFocusChanged(ZILandroid/graphics/Rect;)V
|
||
|
|
||
|
iget-object p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mSearchView:Landroidx/appcompat/widget/SearchView;
|
||
|
|
||
|
invoke-virtual {p1}, Landroidx/appcompat/widget/SearchView;->onTextFocusChanged()V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public onKeyPreIme(ILandroid/view/KeyEvent;)Z
|
||
|
.locals 2
|
||
|
|
||
|
const/4 v0, 0x4
|
||
|
|
||
|
if-ne p1, v0, :cond_3
|
||
|
|
||
|
invoke-virtual {p2}, Landroid/view/KeyEvent;->getAction()I
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
const/4 v1, 0x1
|
||
|
|
||
|
if-nez v0, :cond_1
|
||
|
|
||
|
invoke-virtual {p2}, Landroid/view/KeyEvent;->getRepeatCount()I
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-nez v0, :cond_1
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->getKeyDispatcherState()Landroid/view/KeyEvent$DispatcherState;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
if-eqz p1, :cond_0
|
||
|
|
||
|
invoke-virtual {p1, p2, p0}, Landroid/view/KeyEvent$DispatcherState;->startTracking(Landroid/view/KeyEvent;Ljava/lang/Object;)V
|
||
|
|
||
|
:cond_0
|
||
|
return v1
|
||
|
|
||
|
:cond_1
|
||
|
invoke-virtual {p2}, Landroid/view/KeyEvent;->getAction()I
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-ne v0, v1, :cond_3
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->getKeyDispatcherState()Landroid/view/KeyEvent$DispatcherState;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
if-eqz v0, :cond_2
|
||
|
|
||
|
invoke-virtual {v0, p2}, Landroid/view/KeyEvent$DispatcherState;->handleUpEvent(Landroid/view/KeyEvent;)V
|
||
|
|
||
|
:cond_2
|
||
|
invoke-virtual {p2}, Landroid/view/KeyEvent;->isTracking()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-eqz v0, :cond_3
|
||
|
|
||
|
invoke-virtual {p2}, Landroid/view/KeyEvent;->isCanceled()Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-nez v0, :cond_3
|
||
|
|
||
|
iget-object p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mSearchView:Landroidx/appcompat/widget/SearchView;
|
||
|
|
||
|
invoke-virtual {p1}, Landroidx/appcompat/widget/SearchView;->clearFocus()V
|
||
|
|
||
|
const/4 p1, 0x0
|
||
|
|
||
|
invoke-virtual {p0, p1}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->setImeVisibility(Z)V
|
||
|
|
||
|
return v1
|
||
|
|
||
|
:cond_3
|
||
|
invoke-super {p0, p1, p2}, Landroidx/appcompat/widget/AppCompatAutoCompleteTextView;->onKeyPreIme(ILandroid/view/KeyEvent;)Z
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
return p1
|
||
|
.end method
|
||
|
|
||
|
.method public onWindowFocusChanged(Z)V
|
||
|
.locals 1
|
||
|
|
||
|
invoke-super {p0, p1}, Landroidx/appcompat/widget/AppCompatAutoCompleteTextView;->onWindowFocusChanged(Z)V
|
||
|
|
||
|
if-eqz p1, :cond_0
|
||
|
|
||
|
iget-object p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mSearchView:Landroidx/appcompat/widget/SearchView;
|
||
|
|
||
|
invoke-virtual {p1}, Landroidx/appcompat/widget/SearchView;->hasFocus()Z
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
if-eqz p1, :cond_0
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->getVisibility()I
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
if-nez p1, :cond_0
|
||
|
|
||
|
const/4 p1, 0x1
|
||
|
|
||
|
iput-boolean p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mHasPendingShowSoftInputRequest:Z
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->getContext()Landroid/content/Context;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-static {v0}, Landroidx/appcompat/widget/SearchView;->isLandscapeMode(Landroid/content/Context;)Z
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
sget-object v0, Landroidx/appcompat/widget/SearchView;->HIDDEN_METHOD_INVOKER:Landroidx/appcompat/widget/SearchView$AutoCompleteTextViewReflector;
|
||
|
|
||
|
invoke-virtual {v0, p0, p1}, Landroidx/appcompat/widget/SearchView$AutoCompleteTextViewReflector;->ensureImeVisible(Landroid/widget/AutoCompleteTextView;Z)V
|
||
|
|
||
|
:cond_0
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public performCompletion()V
|
||
|
.locals 0
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method protected replaceText(Ljava/lang/CharSequence;)V
|
||
|
.locals 0
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method setImeVisibility(Z)V
|
||
|
.locals 2
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->getContext()Landroid/content/Context;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
const-string v1, "input_method"
|
||
|
|
||
|
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
check-cast v0, Landroid/view/inputmethod/InputMethodManager;
|
||
|
|
||
|
const/4 v1, 0x0
|
||
|
|
||
|
if-nez p1, :cond_0
|
||
|
|
||
|
iput-boolean v1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mHasPendingShowSoftInputRequest:Z
|
||
|
|
||
|
iget-object p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mRunShowSoftInputIfNecessary:Ljava/lang/Runnable;
|
||
|
|
||
|
invoke-virtual {p0, p1}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->removeCallbacks(Ljava/lang/Runnable;)Z
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->getWindowToken()Landroid/os/IBinder;
|
||
|
|
||
|
move-result-object p1
|
||
|
|
||
|
invoke-virtual {v0, p1, v1}, Landroid/view/inputmethod/InputMethodManager;->hideSoftInputFromWindow(Landroid/os/IBinder;I)Z
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:cond_0
|
||
|
invoke-virtual {v0, p0}, Landroid/view/inputmethod/InputMethodManager;->isActive(Landroid/view/View;)Z
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
if-eqz p1, :cond_1
|
||
|
|
||
|
iput-boolean v1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mHasPendingShowSoftInputRequest:Z
|
||
|
|
||
|
iget-object p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mRunShowSoftInputIfNecessary:Ljava/lang/Runnable;
|
||
|
|
||
|
invoke-virtual {p0, p1}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->removeCallbacks(Ljava/lang/Runnable;)Z
|
||
|
|
||
|
invoke-virtual {v0, p0, v1}, Landroid/view/inputmethod/InputMethodManager;->showSoftInput(Landroid/view/View;I)Z
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:cond_1
|
||
|
const/4 p1, 0x1
|
||
|
|
||
|
iput-boolean p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mHasPendingShowSoftInputRequest:Z
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method setSearchView(Landroidx/appcompat/widget/SearchView;)V
|
||
|
.locals 0
|
||
|
|
||
|
iput-object p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mSearchView:Landroidx/appcompat/widget/SearchView;
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public setThreshold(I)V
|
||
|
.locals 0
|
||
|
|
||
|
invoke-super {p0, p1}, Landroidx/appcompat/widget/AppCompatAutoCompleteTextView;->setThreshold(I)V
|
||
|
|
||
|
iput p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mThreshold:I
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method showSoftInputIfNecessary()V
|
||
|
.locals 2
|
||
|
|
||
|
iget-boolean v0, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mHasPendingShowSoftInputRequest:Z
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
invoke-virtual {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->getContext()Landroid/content/Context;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
const-string v1, "input_method"
|
||
|
|
||
|
invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
check-cast v0, Landroid/view/inputmethod/InputMethodManager;
|
||
|
|
||
|
const/4 v1, 0x0
|
||
|
|
||
|
invoke-virtual {v0, p0, v1}, Landroid/view/inputmethod/InputMethodManager;->showSoftInput(Landroid/view/View;I)Z
|
||
|
|
||
|
iput-boolean v1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mHasPendingShowSoftInputRequest:Z
|
||
|
|
||
|
:cond_0
|
||
|
return-void
|
||
|
.end method
|