262 lines
6.5 KiB
Smali
262 lines
6.5 KiB
Smali
.class Landroidx/core/widget/NestedScrollView$AccessibilityDelegate;
|
|
.super Landroidx/core/view/AccessibilityDelegateCompat;
|
|
.source "NestedScrollView.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Landroidx/core/widget/NestedScrollView;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x8
|
|
name = "AccessibilityDelegate"
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Landroidx/core/view/AccessibilityDelegateCompat;-><init>()V
|
|
|
|
return-void
|
|
.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
|
|
|
|
check-cast p1, Landroidx/core/widget/NestedScrollView;
|
|
|
|
const-class v0, Landroid/widget/ScrollView;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2, v0}, Landroid/view/accessibility/AccessibilityEvent;->setClassName(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getScrollRange()I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
invoke-virtual {p2, v0}, Landroid/view/accessibility/AccessibilityEvent;->setScrollable(Z)V
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getScrollX()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p2, v0}, Landroid/view/accessibility/AccessibilityEvent;->setScrollX(I)V
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getScrollY()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p2, v0}, Landroid/view/accessibility/AccessibilityEvent;->setScrollY(I)V
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getScrollX()I
|
|
|
|
move-result v0
|
|
|
|
invoke-static {p2, v0}, Landroidx/core/view/accessibility/AccessibilityRecordCompat;->setMaxScrollX(Landroid/view/accessibility/AccessibilityRecord;I)V
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getScrollRange()I
|
|
|
|
move-result p1
|
|
|
|
invoke-static {p2, p1}, Landroidx/core/view/accessibility/AccessibilityRecordCompat;->setMaxScrollY(Landroid/view/accessibility/AccessibilityRecord;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onInitializeAccessibilityNodeInfo(Landroid/view/View;Landroidx/core/view/accessibility/AccessibilityNodeInfoCompat;)V
|
|
.locals 2
|
|
|
|
invoke-super {p0, p1, p2}, Landroidx/core/view/AccessibilityDelegateCompat;->onInitializeAccessibilityNodeInfo(Landroid/view/View;Landroidx/core/view/accessibility/AccessibilityNodeInfoCompat;)V
|
|
|
|
check-cast p1, Landroidx/core/widget/NestedScrollView;
|
|
|
|
const-class v0, Landroid/widget/ScrollView;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2, v0}, Landroidx/core/view/accessibility/AccessibilityNodeInfoCompat;->setClassName(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->isEnabled()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getScrollRange()I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-virtual {p2, v1}, Landroidx/core/view/accessibility/AccessibilityNodeInfoCompat;->setScrollable(Z)V
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getScrollY()I
|
|
|
|
move-result v1
|
|
|
|
if-lez v1, :cond_0
|
|
|
|
const/16 v1, 0x2000
|
|
|
|
invoke-virtual {p2, v1}, Landroidx/core/view/accessibility/AccessibilityNodeInfoCompat;->addAction(I)V
|
|
|
|
:cond_0
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getScrollY()I
|
|
|
|
move-result p1
|
|
|
|
if-ge p1, v0, :cond_1
|
|
|
|
const/16 p1, 0x1000
|
|
|
|
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 2
|
|
|
|
invoke-super {p0, p1, p2, p3}, Landroidx/core/view/AccessibilityDelegateCompat;->performAccessibilityAction(Landroid/view/View;ILandroid/os/Bundle;)Z
|
|
|
|
move-result p3
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
check-cast p1, Landroidx/core/widget/NestedScrollView;
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->isEnabled()Z
|
|
|
|
move-result p3
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez p3, :cond_1
|
|
|
|
return v1
|
|
|
|
:cond_1
|
|
const/16 p3, 0x1000
|
|
|
|
if-eq p2, p3, :cond_4
|
|
|
|
const/16 p3, 0x2000
|
|
|
|
if-eq p2, p3, :cond_2
|
|
|
|
return v1
|
|
|
|
:cond_2
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getHeight()I
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getPaddingBottom()I
|
|
|
|
move-result p3
|
|
|
|
sub-int/2addr p2, p3
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getPaddingTop()I
|
|
|
|
move-result p3
|
|
|
|
sub-int/2addr p2, p3
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getScrollY()I
|
|
|
|
move-result p3
|
|
|
|
sub-int/2addr p3, p2
|
|
|
|
invoke-static {p3, v1}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getScrollY()I
|
|
|
|
move-result p3
|
|
|
|
if-eq p2, p3, :cond_3
|
|
|
|
invoke-virtual {p1, v1, p2}, Landroidx/core/widget/NestedScrollView;->smoothScrollTo(II)V
|
|
|
|
return v0
|
|
|
|
:cond_3
|
|
return v1
|
|
|
|
:cond_4
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getHeight()I
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getPaddingBottom()I
|
|
|
|
move-result p3
|
|
|
|
sub-int/2addr p2, p3
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getPaddingTop()I
|
|
|
|
move-result p3
|
|
|
|
sub-int/2addr p2, p3
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getScrollY()I
|
|
|
|
move-result p3
|
|
|
|
add-int/2addr p3, p2
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getScrollRange()I
|
|
|
|
move-result p2
|
|
|
|
invoke-static {p3, p2}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result p2
|
|
|
|
invoke-virtual {p1}, Landroidx/core/widget/NestedScrollView;->getScrollY()I
|
|
|
|
move-result p3
|
|
|
|
if-eq p2, p3, :cond_5
|
|
|
|
invoke-virtual {p1, v1, p2}, Landroidx/core/widget/NestedScrollView;->smoothScrollTo(II)V
|
|
|
|
return v0
|
|
|
|
:cond_5
|
|
return v1
|
|
.end method
|