574 lines
15 KiB
Smali
574 lines
15 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
|
|
|
|
.line 1859
|
|
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
|
|
|
|
.line 1863
|
|
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
|
|
|
|
.line 1867
|
|
invoke-direct {p0, p1, p2, p3}, Landroidx/appcompat/widget/AppCompatAutoCompleteTextView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
.line 1851
|
|
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;
|
|
|
|
.line 1868
|
|
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
|
|
|
|
.line 1981
|
|
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
|
|
|
|
.line 1982
|
|
iget v1, v0, Landroid/content/res/Configuration;->screenWidthDp:I
|
|
|
|
.line 1983
|
|
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
|
|
|
|
.line 1985
|
|
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
|
|
|
|
.line 1948
|
|
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
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 v0, 0x1
|
|
|
|
:goto_1
|
|
return v0
|
|
.end method
|
|
|
|
.method ensureImeVisible()V
|
|
.locals 2
|
|
|
|
.line 2042
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x1d
|
|
|
|
if-lt v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 2043
|
|
invoke-static {p0, v0}, Landroidx/appcompat/widget/SearchView$Api29Impl;->setInputMethodMode(Landroidx/appcompat/widget/SearchView$SearchAutoComplete;I)V
|
|
|
|
.line 2044
|
|
invoke-virtual {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->enoughToFilter()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 2045
|
|
invoke-virtual {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->showDropDown()V
|
|
|
|
goto :goto_0
|
|
|
|
.line 2048
|
|
:cond_0
|
|
sget-object v0, Landroidx/appcompat/widget/SearchView;->PRE_API_29_HIDDEN_METHOD_INVOKER:Landroidx/appcompat/widget/SearchView$PreQAutoCompleteTextViewReflector;
|
|
|
|
invoke-virtual {v0, p0}, Landroidx/appcompat/widget/SearchView$PreQAutoCompleteTextViewReflector;->ensureImeVisible(Landroid/widget/AutoCompleteTextView;)V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method isEmpty()Z
|
|
.locals 1
|
|
|
|
.line 1893
|
|
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
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public onCreateInputConnection(Landroid/view/inputmethod/EditorInfo;)Landroid/view/inputmethod/InputConnection;
|
|
.locals 1
|
|
|
|
.line 2000
|
|
invoke-super {p0, p1}, Landroidx/appcompat/widget/AppCompatAutoCompleteTextView;->onCreateInputConnection(Landroid/view/inputmethod/EditorInfo;)Landroid/view/inputmethod/InputConnection;
|
|
|
|
move-result-object p1
|
|
|
|
.line 2001
|
|
iget-boolean v0, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mHasPendingShowSoftInputRequest:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2002
|
|
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
|
|
|
|
.line 2003
|
|
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
|
|
|
|
.line 1873
|
|
invoke-super {p0}, Landroidx/appcompat/widget/AppCompatAutoCompleteTextView;->onFinishInflate()V
|
|
|
|
.line 1874
|
|
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
|
|
|
|
.line 1876
|
|
invoke-direct {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->getSearchViewTextMinWidthDp()I
|
|
|
|
move-result v1
|
|
|
|
int-to-float v1, v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
.line 1875
|
|
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
|
|
|
|
.line 1938
|
|
invoke-super {p0, p1, p2, p3}, Landroidx/appcompat/widget/AppCompatAutoCompleteTextView;->onFocusChanged(ZILandroid/graphics/Rect;)V
|
|
|
|
.line 1939
|
|
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
|
|
|
|
.line 1956
|
|
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
|
|
|
|
.line 1957
|
|
invoke-virtual {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->getKeyDispatcherState()Landroid/view/KeyEvent$DispatcherState;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 1959
|
|
invoke-virtual {p1, p2, p0}, Landroid/view/KeyEvent$DispatcherState;->startTracking(Landroid/view/KeyEvent;Ljava/lang/Object;)V
|
|
|
|
:cond_0
|
|
return v1
|
|
|
|
.line 1962
|
|
:cond_1
|
|
invoke-virtual {p2}, Landroid/view/KeyEvent;->getAction()I
|
|
|
|
move-result v0
|
|
|
|
if-ne v0, v1, :cond_3
|
|
|
|
.line 1963
|
|
invoke-virtual {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->getKeyDispatcherState()Landroid/view/KeyEvent$DispatcherState;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 1965
|
|
invoke-virtual {v0, p2}, Landroid/view/KeyEvent$DispatcherState;->handleUpEvent(Landroid/view/KeyEvent;)V
|
|
|
|
.line 1967
|
|
: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
|
|
|
|
.line 1968
|
|
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
|
|
|
|
.line 1969
|
|
invoke-virtual {p0, p1}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->setImeVisibility(Z)V
|
|
|
|
return v1
|
|
|
|
.line 1974
|
|
: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 0
|
|
|
|
.line 1920
|
|
invoke-super {p0, p1}, Landroidx/appcompat/widget/AppCompatAutoCompleteTextView;->onWindowFocusChanged(Z)V
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 1922
|
|
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
|
|
|
|
.line 1927
|
|
iput-boolean p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mHasPendingShowSoftInputRequest:Z
|
|
|
|
.line 1930
|
|
invoke-virtual {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Landroidx/appcompat/widget/SearchView;->isLandscapeMode(Landroid/content/Context;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 1931
|
|
invoke-virtual {p0}, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->ensureImeVisible()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
|
|
|
|
.line 2019
|
|
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
|
|
|
|
.line 2021
|
|
iput-boolean v1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mHasPendingShowSoftInputRequest:Z
|
|
|
|
.line 2022
|
|
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
|
|
|
|
.line 2023
|
|
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
|
|
|
|
.line 2027
|
|
:cond_0
|
|
invoke-virtual {v0, p0}, Landroid/view/inputmethod/InputMethodManager;->isActive(Landroid/view/View;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
.line 2030
|
|
iput-boolean v1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mHasPendingShowSoftInputRequest:Z
|
|
|
|
.line 2031
|
|
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
|
|
|
|
.line 2032
|
|
invoke-virtual {v0, p0, v1}, Landroid/view/inputmethod/InputMethodManager;->showSoftInput(Landroid/view/View;I)Z
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
const/4 p1, 0x1
|
|
|
|
.line 2038
|
|
iput-boolean p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mHasPendingShowSoftInputRequest:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method setSearchView(Landroidx/appcompat/widget/SearchView;)V
|
|
.locals 0
|
|
|
|
.line 1880
|
|
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
|
|
|
|
.line 1885
|
|
invoke-super {p0, p1}, Landroidx/appcompat/widget/AppCompatAutoCompleteTextView;->setThreshold(I)V
|
|
|
|
.line 1886
|
|
iput p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mThreshold:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method showSoftInputIfNecessary()V
|
|
.locals 2
|
|
|
|
.line 2009
|
|
iget-boolean v0, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mHasPendingShowSoftInputRequest:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 2011
|
|
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
|
|
|
|
.line 2012
|
|
invoke-virtual {v0, p0, v1}, Landroid/view/inputmethod/InputMethodManager;->showSoftInput(Landroid/view/View;I)Z
|
|
|
|
.line 2013
|
|
iput-boolean v1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mHasPendingShowSoftInputRequest:Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|