apkfuckery/com.discord/smali/androidx/appcompat/widget/SearchView$SearchAutoComplete.smali

492 lines
13 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class public Landroidx/appcompat/widget/SearchView$SearchAutoComplete;
.super Landroidx/appcompat/widget/AppCompatAutoCompleteTextView;
.source "SearchView.java"
# annotations
2019-12-06 03:29:40 +00:00
.annotation build Landroidx/annotation/RestrictTo;
value = {
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP_PREFIX:Landroidx/annotation/RestrictTo$Scope;
}
.end annotation
2019-07-24 11:27:29 +00:00
.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
2019-12-06 03:29:40 +00:00
.field public mHasPendingShowSoftInputRequest:Z
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public final mRunShowSoftInputIfNecessary:Ljava/lang/Runnable;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mSearchView:Landroidx/appcompat/widget/SearchView;
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
.field public mThreshold:I
2019-07-24 11:27:29 +00:00
# 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;
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/widget/AutoCompleteTextView;->getThreshold()I
2019-07-24 11:27:29 +00:00
move-result p1
iput p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mThreshold:I
return-void
.end method
.method private getSearchViewTextMinWidthDp()I
.locals 4
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/widget/AutoCompleteTextView;->getResources()Landroid/content/res/Resources;
2019-07-24 11:27:29 +00:00
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
2019-12-06 03:29:40 +00:00
invoke-super {p0}, Landroid/widget/AutoCompleteTextView;->enoughToFilter()Z
2019-07-24 11:27:29 +00:00
move-result v0
if-eqz v0, :cond_0
goto :goto_0
:cond_0
const/4 v0, 0x0
2019-12-06 03:29:40 +00:00
goto :goto_1
2019-07-24 11:27:29 +00:00
:cond_1
:goto_0
const/4 v0, 0x1
2019-12-06 03:29:40 +00:00
:goto_1
2019-07-24 11:27:29 +00:00
return v0
.end method
2019-12-06 03:29:40 +00:00
.method public isEmpty()Z
2019-07-24 11:27:29 +00:00
.locals 1
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/widget/AutoCompleteTextView;->getText()Landroid/text/Editable;
2019-07-24 11:27:29 +00:00
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
2019-12-06 03:29:40 +00:00
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_0
const/4 v0, 0x0
2019-12-06 03:29:40 +00:00
:goto_0
2019-07-24 11:27:29 +00:00
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;
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, v0}, Landroid/widget/AutoCompleteTextView;->removeCallbacks(Ljava/lang/Runnable;)Z
2019-07-24 11:27:29 +00:00
iget-object v0, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mRunShowSoftInputIfNecessary:Ljava/lang/Runnable;
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, v0}, Landroid/widget/AutoCompleteTextView;->post(Ljava/lang/Runnable;)Z
2019-07-24 11:27:29 +00:00
:cond_0
return-object p1
.end method
2019-12-06 03:29:40 +00:00
.method public onFinishInflate()V
2019-07-24 11:27:29 +00:00
.locals 3
2019-12-06 03:29:40 +00:00
invoke-super {p0}, Landroid/widget/AutoCompleteTextView;->onFinishInflate()V
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/widget/AutoCompleteTextView;->getResources()Landroid/content/res/Resources;
2019-07-24 11:27:29 +00:00
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
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, v0}, Landroid/widget/AutoCompleteTextView;->setMinWidth(I)V
2019-07-24 11:27:29 +00:00
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public onFocusChanged(ZILandroid/graphics/Rect;)V
2019-07-24 11:27:29 +00:00
.locals 0
2019-12-06 03:29:40 +00:00
invoke-super {p0, p1, p2, p3}, Landroid/widget/AutoCompleteTextView;->onFocusChanged(ZILandroid/graphics/Rect;)V
2019-07-24 11:27:29 +00:00
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
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/widget/AutoCompleteTextView;->getKeyDispatcherState()Landroid/view/KeyEvent$DispatcherState;
2019-07-24 11:27:29 +00:00
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
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/widget/AutoCompleteTextView;->getKeyDispatcherState()Landroid/view/KeyEvent$DispatcherState;
2019-07-24 11:27:29 +00:00
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
2019-12-06 03:29:40 +00:00
invoke-super {p0, p1, p2}, Landroid/widget/AutoCompleteTextView;->onKeyPreIme(ILandroid/view/KeyEvent;)Z
2019-07-24 11:27:29 +00:00
move-result p1
return p1
.end method
.method public onWindowFocusChanged(Z)V
.locals 1
2019-12-06 03:29:40 +00:00
invoke-super {p0, p1}, Landroid/widget/AutoCompleteTextView;->onWindowFocusChanged(Z)V
2019-07-24 11:27:29 +00:00
if-eqz p1, :cond_0
iget-object p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mSearchView:Landroidx/appcompat/widget/SearchView;
2019-12-06 03:29:40 +00:00
invoke-virtual {p1}, Landroid/view/ViewGroup;->hasFocus()Z
2019-07-24 11:27:29 +00:00
move-result p1
if-eqz p1, :cond_0
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/widget/AutoCompleteTextView;->getVisibility()I
2019-07-24 11:27:29 +00:00
move-result p1
if-nez p1, :cond_0
const/4 p1, 0x1
iput-boolean p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mHasPendingShowSoftInputRequest:Z
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/widget/AutoCompleteTextView;->getContext()Landroid/content/Context;
2019-07-24 11:27:29 +00:00
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
2019-12-06 03:29:40 +00:00
.method public replaceText(Ljava/lang/CharSequence;)V
2019-07-24 11:27:29 +00:00
.locals 0
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public setImeVisibility(Z)V
2019-07-24 11:27:29 +00:00
.locals 2
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/widget/AutoCompleteTextView;->getContext()Landroid/content/Context;
2019-07-24 11:27:29 +00:00
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;
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, p1}, Landroid/widget/AutoCompleteTextView;->removeCallbacks(Ljava/lang/Runnable;)Z
2019-07-24 11:27:29 +00:00
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/widget/AutoCompleteTextView;->getWindowToken()Landroid/os/IBinder;
2019-07-24 11:27:29 +00:00
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;
2019-12-06 03:29:40 +00:00
invoke-virtual {p0, p1}, Landroid/widget/AutoCompleteTextView;->removeCallbacks(Ljava/lang/Runnable;)Z
2019-07-24 11:27:29 +00:00
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
2019-12-06 03:29:40 +00:00
.method public setSearchView(Landroidx/appcompat/widget/SearchView;)V
2019-07-24 11:27:29 +00:00
.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
2019-12-06 03:29:40 +00:00
invoke-super {p0, p1}, Landroid/widget/AutoCompleteTextView;->setThreshold(I)V
2019-07-24 11:27:29 +00:00
iput p1, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mThreshold:I
return-void
.end method
2019-12-06 03:29:40 +00:00
.method public showSoftInputIfNecessary()V
2019-07-24 11:27:29 +00:00
.locals 2
iget-boolean v0, p0, Landroidx/appcompat/widget/SearchView$SearchAutoComplete;->mHasPendingShowSoftInputRequest:Z
if-eqz v0, :cond_0
2019-12-06 03:29:40 +00:00
invoke-virtual {p0}, Landroid/widget/AutoCompleteTextView;->getContext()Landroid/content/Context;
2019-07-24 11:27:29 +00:00
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