354 lines
11 KiB
Smali
354 lines
11 KiB
Smali
.class public Landroidx/appcompat/view/StandaloneActionMode;
|
|
.super Landroidx/appcompat/view/ActionMode;
|
|
.source "StandaloneActionMode.java"
|
|
|
|
# interfaces
|
|
.implements Landroidx/appcompat/view/menu/MenuBuilder$Callback;
|
|
|
|
|
|
# annotations
|
|
.annotation build Landroidx/annotation/RestrictTo;
|
|
value = {
|
|
.enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP_PREFIX:Landroidx/annotation/RestrictTo$Scope;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public mCallback:Landroidx/appcompat/view/ActionMode$Callback;
|
|
|
|
.field public mContext:Landroid/content/Context;
|
|
|
|
.field public mContextView:Landroidx/appcompat/widget/ActionBarContextView;
|
|
|
|
.field public mCustomView:Ljava/lang/ref/WeakReference;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/lang/ref/WeakReference<",
|
|
"Landroid/view/View;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public mFinished:Z
|
|
|
|
.field public mFocusable:Z
|
|
|
|
.field public mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;Landroidx/appcompat/widget/ActionBarContextView;Landroidx/appcompat/view/ActionMode$Callback;Z)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Landroidx/appcompat/view/ActionMode;-><init>()V
|
|
|
|
iput-object p1, p0, Landroidx/appcompat/view/StandaloneActionMode;->mContext:Landroid/content/Context;
|
|
|
|
iput-object p2, p0, Landroidx/appcompat/view/StandaloneActionMode;->mContextView:Landroidx/appcompat/widget/ActionBarContextView;
|
|
|
|
iput-object p3, p0, Landroidx/appcompat/view/StandaloneActionMode;->mCallback:Landroidx/appcompat/view/ActionMode$Callback;
|
|
|
|
new-instance p1, Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
invoke-virtual {p2}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Landroidx/appcompat/view/menu/MenuBuilder;-><init>(Landroid/content/Context;)V
|
|
|
|
const/4 p2, 0x1
|
|
|
|
invoke-virtual {p1, p2}, Landroidx/appcompat/view/menu/MenuBuilder;->setDefaultShowAsAction(I)Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Landroidx/appcompat/view/StandaloneActionMode;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
invoke-virtual {p1, p0}, Landroidx/appcompat/view/menu/MenuBuilder;->setCallback(Landroidx/appcompat/view/menu/MenuBuilder$Callback;)V
|
|
|
|
iput-boolean p4, p0, Landroidx/appcompat/view/StandaloneActionMode;->mFocusable:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public finish()V
|
|
.locals 2
|
|
|
|
iget-boolean v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mFinished:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mFinished:Z
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mContextView:Landroidx/appcompat/widget/ActionBarContextView;
|
|
|
|
const/16 v1, 0x20
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->sendAccessibilityEvent(I)V
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mCallback:Landroidx/appcompat/view/ActionMode$Callback;
|
|
|
|
invoke-interface {v0, p0}, Landroidx/appcompat/view/ActionMode$Callback;->onDestroyActionMode(Landroidx/appcompat/view/ActionMode;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public getCustomView()Landroid/view/View;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mCustomView:Ljava/lang/ref/WeakReference;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/view/View;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getMenu()Landroid/view/Menu;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getMenuInflater()Landroid/view/MenuInflater;
|
|
.locals 2
|
|
|
|
new-instance v0, Landroidx/appcompat/view/SupportMenuInflater;
|
|
|
|
iget-object v1, p0, Landroidx/appcompat/view/StandaloneActionMode;->mContextView:Landroidx/appcompat/widget/ActionBarContextView;
|
|
|
|
invoke-virtual {v1}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Landroidx/appcompat/view/SupportMenuInflater;-><init>(Landroid/content/Context;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getSubtitle()Ljava/lang/CharSequence;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mContextView:Landroidx/appcompat/widget/ActionBarContextView;
|
|
|
|
invoke-virtual {v0}, Landroidx/appcompat/widget/ActionBarContextView;->getSubtitle()Ljava/lang/CharSequence;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getTitle()Ljava/lang/CharSequence;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mContextView:Landroidx/appcompat/widget/ActionBarContextView;
|
|
|
|
invoke-virtual {v0}, Landroidx/appcompat/widget/ActionBarContextView;->getTitle()Ljava/lang/CharSequence;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public invalidate()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mCallback:Landroidx/appcompat/view/ActionMode$Callback;
|
|
|
|
iget-object v1, p0, Landroidx/appcompat/view/StandaloneActionMode;->mMenu:Landroidx/appcompat/view/menu/MenuBuilder;
|
|
|
|
invoke-interface {v0, p0, v1}, Landroidx/appcompat/view/ActionMode$Callback;->onPrepareActionMode(Landroidx/appcompat/view/ActionMode;Landroid/view/Menu;)Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public isTitleOptional()Z
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mContextView:Landroidx/appcompat/widget/ActionBarContextView;
|
|
|
|
invoke-virtual {v0}, Landroidx/appcompat/widget/ActionBarContextView;->isTitleOptional()Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public isUiFocusable()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mFocusable:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onCloseMenu(Landroidx/appcompat/view/menu/MenuBuilder;Z)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onCloseSubMenu(Landroidx/appcompat/view/menu/SubMenuBuilder;)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onMenuItemSelected(Landroidx/appcompat/view/menu/MenuBuilder;Landroid/view/MenuItem;)Z
|
|
.locals 0
|
|
|
|
iget-object p1, p0, Landroidx/appcompat/view/StandaloneActionMode;->mCallback:Landroidx/appcompat/view/ActionMode$Callback;
|
|
|
|
invoke-interface {p1, p0, p2}, Landroidx/appcompat/view/ActionMode$Callback;->onActionItemClicked(Landroidx/appcompat/view/ActionMode;Landroid/view/MenuItem;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public onMenuModeChange(Landroidx/appcompat/view/menu/MenuBuilder;)V
|
|
.locals 0
|
|
|
|
invoke-virtual {p0}, Landroidx/appcompat/view/StandaloneActionMode;->invalidate()V
|
|
|
|
iget-object p1, p0, Landroidx/appcompat/view/StandaloneActionMode;->mContextView:Landroidx/appcompat/widget/ActionBarContextView;
|
|
|
|
invoke-virtual {p1}, Landroidx/appcompat/widget/ActionBarContextView;->showOverflowMenu()Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onSubMenuSelected(Landroidx/appcompat/view/menu/SubMenuBuilder;)Z
|
|
.locals 3
|
|
|
|
invoke-virtual {p1}, Landroidx/appcompat/view/menu/MenuBuilder;->hasVisibleItems()Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
new-instance v0, Landroidx/appcompat/view/menu/MenuPopupHelper;
|
|
|
|
iget-object v2, p0, Landroidx/appcompat/view/StandaloneActionMode;->mContextView:Landroidx/appcompat/widget/ActionBarContextView;
|
|
|
|
invoke-virtual {v2}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {v0, v2, p1}, Landroidx/appcompat/view/menu/MenuPopupHelper;-><init>(Landroid/content/Context;Landroidx/appcompat/view/menu/MenuBuilder;)V
|
|
|
|
invoke-virtual {v0}, Landroidx/appcompat/view/menu/MenuPopupHelper;->show()V
|
|
|
|
return v1
|
|
.end method
|
|
|
|
.method public setCustomView(Landroid/view/View;)V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mContextView:Landroidx/appcompat/widget/ActionBarContextView;
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/appcompat/widget/ActionBarContextView;->setCustomView(Landroid/view/View;)V
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
new-instance v0, Ljava/lang/ref/WeakReference;
|
|
|
|
invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
iput-object v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mCustomView:Ljava/lang/ref/WeakReference;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setSubtitle(I)V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mContext:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/appcompat/view/StandaloneActionMode;->setSubtitle(Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setSubtitle(Ljava/lang/CharSequence;)V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mContextView:Landroidx/appcompat/widget/ActionBarContextView;
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/appcompat/widget/ActionBarContextView;->setSubtitle(Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setTitle(I)V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mContext:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/appcompat/view/StandaloneActionMode;->setTitle(Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setTitle(Ljava/lang/CharSequence;)V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mContextView:Landroidx/appcompat/widget/ActionBarContextView;
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/appcompat/widget/ActionBarContextView;->setTitle(Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public setTitleOptionalHint(Z)V
|
|
.locals 1
|
|
|
|
invoke-super {p0, p1}, Landroidx/appcompat/view/ActionMode;->setTitleOptionalHint(Z)V
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/view/StandaloneActionMode;->mContextView:Landroidx/appcompat/widget/ActionBarContextView;
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/appcompat/widget/ActionBarContextView;->setTitleOptional(Z)V
|
|
|
|
return-void
|
|
.end method
|