247 lines
7.5 KiB
Smali
247 lines
7.5 KiB
Smali
.class Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;
|
|
.super Landroidx/core/view/AccessibilityDelegateCompat;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Landroidx/viewpager/widget/ViewPager;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x0
|
|
name = "MyAccessibilityDelegate"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field final synthetic this$0:Landroidx/viewpager/widget/ViewPager;
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(Landroidx/viewpager/widget/ViewPager;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;->this$0:Landroidx/viewpager/widget/ViewPager;
|
|
|
|
invoke-direct {p0}, Landroidx/core/view/AccessibilityDelegateCompat;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private canScroll()Z
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;->this$0:Landroidx/viewpager/widget/ViewPager;
|
|
|
|
iget-object v0, v0, Landroidx/viewpager/widget/ViewPager;->mAdapter:Landroidx/viewpager/widget/PagerAdapter;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;->this$0:Landroidx/viewpager/widget/ViewPager;
|
|
|
|
iget-object v0, v0, Landroidx/viewpager/widget/ViewPager;->mAdapter:Landroidx/viewpager/widget/PagerAdapter;
|
|
|
|
invoke-virtual {v0}, Landroidx/viewpager/widget/PagerAdapter;->getCount()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-le v0, v1, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onInitializeAccessibilityEvent(Landroid/view/View;Landroid/view/accessibility/AccessibilityEvent;)V
|
|
.locals 1
|
|
|
|
invoke-super {p0, p1, p2}, Landroidx/core/view/AccessibilityDelegateCompat;->onInitializeAccessibilityEvent(Landroid/view/View;Landroid/view/accessibility/AccessibilityEvent;)V
|
|
|
|
const-class p1, Landroidx/viewpager/widget/ViewPager;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p2, p1}, Landroid/view/accessibility/AccessibilityEvent;->setClassName(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-direct {p0}, Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;->canScroll()Z
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p2, p1}, Landroid/view/accessibility/AccessibilityEvent;->setScrollable(Z)V
|
|
|
|
invoke-virtual {p2}, Landroid/view/accessibility/AccessibilityEvent;->getEventType()I
|
|
|
|
move-result p1
|
|
|
|
const/16 v0, 0x1000
|
|
|
|
if-ne p1, v0, :cond_0
|
|
|
|
iget-object p1, p0, Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;->this$0:Landroidx/viewpager/widget/ViewPager;
|
|
|
|
iget-object p1, p1, Landroidx/viewpager/widget/ViewPager;->mAdapter:Landroidx/viewpager/widget/PagerAdapter;
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object p1, p0, Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;->this$0:Landroidx/viewpager/widget/ViewPager;
|
|
|
|
iget-object p1, p1, Landroidx/viewpager/widget/ViewPager;->mAdapter:Landroidx/viewpager/widget/PagerAdapter;
|
|
|
|
invoke-virtual {p1}, Landroidx/viewpager/widget/PagerAdapter;->getCount()I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p2, p1}, Landroid/view/accessibility/AccessibilityEvent;->setItemCount(I)V
|
|
|
|
iget-object p1, p0, Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;->this$0:Landroidx/viewpager/widget/ViewPager;
|
|
|
|
iget p1, p1, Landroidx/viewpager/widget/ViewPager;->mCurItem:I
|
|
|
|
invoke-virtual {p2, p1}, Landroid/view/accessibility/AccessibilityEvent;->setFromIndex(I)V
|
|
|
|
iget-object p1, p0, Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;->this$0:Landroidx/viewpager/widget/ViewPager;
|
|
|
|
iget p1, p1, Landroidx/viewpager/widget/ViewPager;->mCurItem:I
|
|
|
|
invoke-virtual {p2, p1}, Landroid/view/accessibility/AccessibilityEvent;->setToIndex(I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public onInitializeAccessibilityNodeInfo(Landroid/view/View;Landroidx/core/view/accessibility/AccessibilityNodeInfoCompat;)V
|
|
.locals 1
|
|
|
|
invoke-super {p0, p1, p2}, Landroidx/core/view/AccessibilityDelegateCompat;->onInitializeAccessibilityNodeInfo(Landroid/view/View;Landroidx/core/view/accessibility/AccessibilityNodeInfoCompat;)V
|
|
|
|
const-class p1, Landroidx/viewpager/widget/ViewPager;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p2, p1}, Landroidx/core/view/accessibility/AccessibilityNodeInfoCompat;->setClassName(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-direct {p0}, Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;->canScroll()Z
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {p2, p1}, Landroidx/core/view/accessibility/AccessibilityNodeInfoCompat;->setScrollable(Z)V
|
|
|
|
iget-object p1, p0, Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;->this$0:Landroidx/viewpager/widget/ViewPager;
|
|
|
|
const/4 v0, 0x1
|
|
|
|
invoke-virtual {p1, v0}, Landroidx/viewpager/widget/ViewPager;->canScrollHorizontally(I)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/16 p1, 0x1000
|
|
|
|
invoke-virtual {p2, p1}, Landroidx/core/view/accessibility/AccessibilityNodeInfoCompat;->addAction(I)V
|
|
|
|
:cond_0
|
|
iget-object p1, p0, Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;->this$0:Landroidx/viewpager/widget/ViewPager;
|
|
|
|
const/4 v0, -0x1
|
|
|
|
invoke-virtual {p1, v0}, Landroidx/viewpager/widget/ViewPager;->canScrollHorizontally(I)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const/16 p1, 0x2000
|
|
|
|
invoke-virtual {p2, p1}, Landroidx/core/view/accessibility/AccessibilityNodeInfoCompat;->addAction(I)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public performAccessibilityAction(Landroid/view/View;ILandroid/os/Bundle;)Z
|
|
.locals 1
|
|
|
|
invoke-super {p0, p1, p2, p3}, Landroidx/core/view/AccessibilityDelegateCompat;->performAccessibilityAction(Landroid/view/View;ILandroid/os/Bundle;)Z
|
|
|
|
move-result p1
|
|
|
|
const/4 p3, 0x1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
return p3
|
|
|
|
:cond_0
|
|
const/16 p1, 0x1000
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eq p2, p1, :cond_3
|
|
|
|
const/16 p1, 0x2000
|
|
|
|
if-eq p2, p1, :cond_1
|
|
|
|
return v0
|
|
|
|
:cond_1
|
|
iget-object p1, p0, Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;->this$0:Landroidx/viewpager/widget/ViewPager;
|
|
|
|
const/4 p2, -0x1
|
|
|
|
invoke-virtual {p1, p2}, Landroidx/viewpager/widget/ViewPager;->canScrollHorizontally(I)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
iget-object p1, p0, Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;->this$0:Landroidx/viewpager/widget/ViewPager;
|
|
|
|
iget-object p2, p0, Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;->this$0:Landroidx/viewpager/widget/ViewPager;
|
|
|
|
iget p2, p2, Landroidx/viewpager/widget/ViewPager;->mCurItem:I
|
|
|
|
sub-int/2addr p2, p3
|
|
|
|
:goto_0
|
|
invoke-virtual {p1, p2}, Landroidx/viewpager/widget/ViewPager;->setCurrentItem(I)V
|
|
|
|
return p3
|
|
|
|
:cond_2
|
|
return v0
|
|
|
|
:cond_3
|
|
iget-object p1, p0, Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;->this$0:Landroidx/viewpager/widget/ViewPager;
|
|
|
|
invoke-virtual {p1, p3}, Landroidx/viewpager/widget/ViewPager;->canScrollHorizontally(I)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
iget-object p1, p0, Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;->this$0:Landroidx/viewpager/widget/ViewPager;
|
|
|
|
iget-object p2, p0, Landroidx/viewpager/widget/ViewPager$MyAccessibilityDelegate;->this$0:Landroidx/viewpager/widget/ViewPager;
|
|
|
|
iget p2, p2, Landroidx/viewpager/widget/ViewPager;->mCurItem:I
|
|
|
|
add-int/2addr p2, p3
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
return v0
|
|
.end method
|