329 lines
12 KiB
Smali
329 lines
12 KiB
Smali
.class Landroidx/appcompat/widget/ActivityChooserView$Callbacks;
|
|
.super Ljava/lang/Object;
|
|
.source "ActivityChooserView.java"
|
|
|
|
# interfaces
|
|
.implements Landroid/view/View$OnClickListener;
|
|
.implements Landroid/view/View$OnLongClickListener;
|
|
.implements Landroid/widget/AdapterView$OnItemClickListener;
|
|
.implements Landroid/widget/PopupWindow$OnDismissListener;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Landroidx/appcompat/widget/ActivityChooserView;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x0
|
|
name = "Callbacks"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field final synthetic this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(Landroidx/appcompat/widget/ActivityChooserView;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private notifyOnDismissListener()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
iget-object v0, v0, Landroidx/appcompat/widget/ActivityChooserView;->mOnDismissListener:Landroid/widget/PopupWindow$OnDismissListener;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
iget-object v0, v0, Landroidx/appcompat/widget/ActivityChooserView;->mOnDismissListener:Landroid/widget/PopupWindow$OnDismissListener;
|
|
|
|
invoke-interface {v0}, Landroid/widget/PopupWindow$OnDismissListener;->onDismiss()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onClick(Landroid/view/View;)V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
iget-object v0, v0, Landroidx/appcompat/widget/ActivityChooserView;->mDefaultActivityButton:Landroid/widget/FrameLayout;
|
|
|
|
if-ne p1, v0, :cond_1
|
|
|
|
iget-object p1, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
invoke-virtual {p1}, Landroidx/appcompat/widget/ActivityChooserView;->dismissPopup()Z
|
|
|
|
iget-object p1, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
iget-object p1, p1, Landroidx/appcompat/widget/ActivityChooserView;->mAdapter:Landroidx/appcompat/widget/ActivityChooserView$ActivityChooserViewAdapter;
|
|
|
|
invoke-virtual {p1}, Landroidx/appcompat/widget/ActivityChooserView$ActivityChooserViewAdapter;->getDefaultActivity()Landroid/content/pm/ResolveInfo;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
iget-object v0, v0, Landroidx/appcompat/widget/ActivityChooserView;->mAdapter:Landroidx/appcompat/widget/ActivityChooserView$ActivityChooserViewAdapter;
|
|
|
|
invoke-virtual {v0}, Landroidx/appcompat/widget/ActivityChooserView$ActivityChooserViewAdapter;->getDataModel()Landroidx/appcompat/widget/ActivityChooserModel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/appcompat/widget/ActivityChooserModel;->getActivityIndex(Landroid/content/pm/ResolveInfo;)I
|
|
|
|
move-result p1
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
iget-object v0, v0, Landroidx/appcompat/widget/ActivityChooserView;->mAdapter:Landroidx/appcompat/widget/ActivityChooserView$ActivityChooserViewAdapter;
|
|
|
|
invoke-virtual {v0}, Landroidx/appcompat/widget/ActivityChooserView$ActivityChooserViewAdapter;->getDataModel()Landroidx/appcompat/widget/ActivityChooserModel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/appcompat/widget/ActivityChooserModel;->chooseActivity(I)Landroid/content/Intent;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/high16 v0, 0x80000
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
invoke-virtual {v0}, Landroidx/appcompat/widget/ActivityChooserView;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
iget-object v0, v0, Landroidx/appcompat/widget/ActivityChooserView;->mExpandActivityOverflowButton:Landroid/widget/FrameLayout;
|
|
|
|
if-ne p1, v0, :cond_2
|
|
|
|
iget-object p1, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-boolean v0, p1, Landroidx/appcompat/widget/ActivityChooserView;->mIsSelectingDefaultActivity:Z
|
|
|
|
iget v0, p1, Landroidx/appcompat/widget/ActivityChooserView;->mInitialActivityCount:I
|
|
|
|
invoke-virtual {p1, v0}, Landroidx/appcompat/widget/ActivityChooserView;->showPopupUnchecked(I)V
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/IllegalArgumentException;-><init>()V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public onDismiss()V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->notifyOnDismissListener()V
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
iget-object v0, v0, Landroidx/appcompat/widget/ActivityChooserView;->mProvider:Landroidx/core/view/ActionProvider;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
iget-object v0, v0, Landroidx/appcompat/widget/ActivityChooserView;->mProvider:Landroidx/core/view/ActionProvider;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/core/view/ActionProvider;->subUiVisibilityChanged(Z)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public onItemClick(Landroid/widget/AdapterView;Landroid/view/View;IJ)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/widget/AdapterView<",
|
|
"*>;",
|
|
"Landroid/view/View;",
|
|
"IJ)V"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-virtual {p1}, Landroid/widget/AdapterView;->getAdapter()Landroid/widget/Adapter;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroidx/appcompat/widget/ActivityChooserView$ActivityChooserViewAdapter;
|
|
|
|
invoke-virtual {p1, p3}, Landroidx/appcompat/widget/ActivityChooserView$ActivityChooserViewAdapter;->getItemViewType(I)I
|
|
|
|
move-result p1
|
|
|
|
packed-switch p1, :pswitch_data_0
|
|
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/IllegalArgumentException;-><init>()V
|
|
|
|
throw p1
|
|
|
|
:pswitch_0
|
|
iget-object p1, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
const p2, 0x7fffffff
|
|
|
|
invoke-virtual {p1, p2}, Landroidx/appcompat/widget/ActivityChooserView;->showPopupUnchecked(I)V
|
|
|
|
return-void
|
|
|
|
:pswitch_1
|
|
iget-object p1, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
invoke-virtual {p1}, Landroidx/appcompat/widget/ActivityChooserView;->dismissPopup()Z
|
|
|
|
iget-object p1, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
iget-boolean p1, p1, Landroidx/appcompat/widget/ActivityChooserView;->mIsSelectingDefaultActivity:Z
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-lez p3, :cond_0
|
|
|
|
iget-object p1, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
iget-object p1, p1, Landroidx/appcompat/widget/ActivityChooserView;->mAdapter:Landroidx/appcompat/widget/ActivityChooserView$ActivityChooserViewAdapter;
|
|
|
|
invoke-virtual {p1}, Landroidx/appcompat/widget/ActivityChooserView$ActivityChooserViewAdapter;->getDataModel()Landroidx/appcompat/widget/ActivityChooserModel;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, p3}, Landroidx/appcompat/widget/ActivityChooserModel;->setDefaultActivity(I)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
return-void
|
|
|
|
:cond_1
|
|
iget-object p1, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
iget-object p1, p1, Landroidx/appcompat/widget/ActivityChooserView;->mAdapter:Landroidx/appcompat/widget/ActivityChooserView$ActivityChooserViewAdapter;
|
|
|
|
invoke-virtual {p1}, Landroidx/appcompat/widget/ActivityChooserView$ActivityChooserViewAdapter;->getShowDefaultActivity()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
add-int/lit8 p3, p3, 0x1
|
|
|
|
:goto_0
|
|
iget-object p1, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
iget-object p1, p1, Landroidx/appcompat/widget/ActivityChooserView;->mAdapter:Landroidx/appcompat/widget/ActivityChooserView$ActivityChooserViewAdapter;
|
|
|
|
invoke-virtual {p1}, Landroidx/appcompat/widget/ActivityChooserView$ActivityChooserViewAdapter;->getDataModel()Landroidx/appcompat/widget/ActivityChooserModel;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, p3}, Landroidx/appcompat/widget/ActivityChooserModel;->chooseActivity(I)Landroid/content/Intent;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
const/high16 p2, 0x80000
|
|
|
|
invoke-virtual {p1, p2}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;
|
|
|
|
iget-object p2, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
invoke-virtual {p2}, Landroidx/appcompat/widget/ActivityChooserView;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2, p1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
|
|
|
|
:cond_3
|
|
return-void
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x0
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public onLongClick(Landroid/view/View;)Z
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
iget-object v0, v0, Landroidx/appcompat/widget/ActivityChooserView;->mDefaultActivityButton:Landroid/widget/FrameLayout;
|
|
|
|
if-ne p1, v0, :cond_1
|
|
|
|
iget-object p1, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
iget-object p1, p1, Landroidx/appcompat/widget/ActivityChooserView;->mAdapter:Landroidx/appcompat/widget/ActivityChooserView$ActivityChooserViewAdapter;
|
|
|
|
invoke-virtual {p1}, Landroidx/appcompat/widget/ActivityChooserView$ActivityChooserViewAdapter;->getCount()I
|
|
|
|
move-result p1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-lez p1, :cond_0
|
|
|
|
iget-object p1, p0, Landroidx/appcompat/widget/ActivityChooserView$Callbacks;->this$0:Landroidx/appcompat/widget/ActivityChooserView;
|
|
|
|
iput-boolean v0, p1, Landroidx/appcompat/widget/ActivityChooserView;->mIsSelectingDefaultActivity:Z
|
|
|
|
iget v1, p1, Landroidx/appcompat/widget/ActivityChooserView;->mInitialActivityCount:I
|
|
|
|
invoke-virtual {p1, v1}, Landroidx/appcompat/widget/ActivityChooserView;->showPopupUnchecked(I)V
|
|
|
|
:cond_0
|
|
return v0
|
|
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
invoke-direct {p1}, Ljava/lang/IllegalArgumentException;-><init>()V
|
|
|
|
throw p1
|
|
.end method
|