Initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package androidx.core.view.accessibility;
|
||||
|
||||
import android.os.Build;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class AccessibilityEventCompat {
|
||||
public static void a(AccessibilityEvent accessibilityEvent, int i) {
|
||||
if (Build.VERSION.SDK_INT >= 19) {
|
||||
accessibilityEvent.setContentChangeTypes(i);
|
||||
}
|
||||
}
|
||||
|
||||
public static int a(AccessibilityEvent accessibilityEvent) {
|
||||
if (Build.VERSION.SDK_INT >= 19) {
|
||||
return accessibilityEvent.getContentChangeTypes();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
@@ -0,0 +1,53 @@
|
||||
package androidx.core.view.accessibility;
|
||||
|
||||
import android.os.Build;
|
||||
import android.view.accessibility.AccessibilityManager;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public final class AccessibilityManagerCompat {
|
||||
|
||||
public interface TouchExplorationStateChangeListener {
|
||||
void onTouchExplorationStateChanged(boolean z);
|
||||
}
|
||||
|
||||
private static class TouchExplorationStateChangeListenerWrapper implements AccessibilityManager.TouchExplorationStateChangeListener {
|
||||
final TouchExplorationStateChangeListener a;
|
||||
|
||||
TouchExplorationStateChangeListenerWrapper(TouchExplorationStateChangeListener touchExplorationStateChangeListener) {
|
||||
this.a = touchExplorationStateChangeListener;
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null || TouchExplorationStateChangeListenerWrapper.class != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
return this.a.equals(((TouchExplorationStateChangeListenerWrapper) obj).a);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return this.a.hashCode();
|
||||
}
|
||||
|
||||
@Override // android.view.accessibility.AccessibilityManager.TouchExplorationStateChangeListener
|
||||
public void onTouchExplorationStateChanged(boolean z) {
|
||||
this.a.onTouchExplorationStateChanged(z);
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean a(AccessibilityManager accessibilityManager, TouchExplorationStateChangeListener touchExplorationStateChangeListener) {
|
||||
if (Build.VERSION.SDK_INT < 19 || touchExplorationStateChangeListener == null) {
|
||||
return false;
|
||||
}
|
||||
return accessibilityManager.addTouchExplorationStateChangeListener(new TouchExplorationStateChangeListenerWrapper(touchExplorationStateChangeListener));
|
||||
}
|
||||
|
||||
public static boolean b(AccessibilityManager accessibilityManager, TouchExplorationStateChangeListener touchExplorationStateChangeListener) {
|
||||
if (Build.VERSION.SDK_INT < 19 || touchExplorationStateChangeListener == null) {
|
||||
return false;
|
||||
}
|
||||
return accessibilityManager.removeTouchExplorationStateChangeListener(new TouchExplorationStateChangeListenerWrapper(touchExplorationStateChangeListener));
|
||||
}
|
||||
}
|
@@ -0,0 +1,334 @@
|
||||
package androidx.core.view.accessibility;
|
||||
|
||||
import android.graphics.Rect;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.accessibility.AccessibilityNodeInfo;
|
||||
import com.ijm.dataencryption.de.DataDecryptTool;
|
||||
import com.ubt.jimu.base.util.FileUtil;
|
||||
import com.ubt.jimu.unity.bluetooth.UnityActivity;
|
||||
import com.ubtrobot.jimu.robotapi.PeripheralType;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class AccessibilityNodeInfoCompat {
|
||||
private final AccessibilityNodeInfo a;
|
||||
|
||||
public static class CollectionInfoCompat {
|
||||
final Object a;
|
||||
|
||||
CollectionInfoCompat(Object obj) {
|
||||
this.a = obj;
|
||||
}
|
||||
|
||||
public static CollectionInfoCompat a(int i, int i2, boolean z, int i3) {
|
||||
int i4 = Build.VERSION.SDK_INT;
|
||||
return i4 >= 21 ? new CollectionInfoCompat(AccessibilityNodeInfo.CollectionInfo.obtain(i, i2, z, i3)) : i4 >= 19 ? new CollectionInfoCompat(AccessibilityNodeInfo.CollectionInfo.obtain(i, i2, z)) : new CollectionInfoCompat(null);
|
||||
}
|
||||
}
|
||||
|
||||
public static class CollectionItemInfoCompat {
|
||||
final Object a;
|
||||
|
||||
CollectionItemInfoCompat(Object obj) {
|
||||
this.a = obj;
|
||||
}
|
||||
|
||||
public static CollectionItemInfoCompat a(int i, int i2, int i3, int i4, boolean z, boolean z2) {
|
||||
int i5 = Build.VERSION.SDK_INT;
|
||||
return i5 >= 21 ? new CollectionItemInfoCompat(AccessibilityNodeInfo.CollectionItemInfo.obtain(i, i2, i3, i4, z, z2)) : i5 >= 19 ? new CollectionItemInfoCompat(AccessibilityNodeInfo.CollectionItemInfo.obtain(i, i2, i3, i4, z)) : new CollectionItemInfoCompat(null);
|
||||
}
|
||||
}
|
||||
|
||||
private AccessibilityNodeInfoCompat(AccessibilityNodeInfo accessibilityNodeInfo) {
|
||||
this.a = accessibilityNodeInfo;
|
||||
}
|
||||
|
||||
public static AccessibilityNodeInfoCompat a(AccessibilityNodeInfo accessibilityNodeInfo) {
|
||||
return new AccessibilityNodeInfoCompat(accessibilityNodeInfo);
|
||||
}
|
||||
|
||||
private static String b(int i) {
|
||||
if (i == 1) {
|
||||
return "ACTION_FOCUS";
|
||||
}
|
||||
if (i == 2) {
|
||||
return "ACTION_CLEAR_FOCUS";
|
||||
}
|
||||
switch (i) {
|
||||
case 4:
|
||||
return "ACTION_SELECT";
|
||||
case 8:
|
||||
return "ACTION_CLEAR_SELECTION";
|
||||
case 16:
|
||||
return "ACTION_CLICK";
|
||||
case 32:
|
||||
return "ACTION_LONG_CLICK";
|
||||
case 64:
|
||||
return "ACTION_ACCESSIBILITY_FOCUS";
|
||||
case PeripheralType.SERVO /* 128 */:
|
||||
return "ACTION_CLEAR_ACCESSIBILITY_FOCUS";
|
||||
case DataDecryptTool.DECRYPT_ALL_FILE /* 256 */:
|
||||
return "ACTION_NEXT_AT_MOVEMENT_GRANULARITY";
|
||||
case DataDecryptTool.DECRYPT_DB_FILE /* 512 */:
|
||||
return "ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY";
|
||||
case DataDecryptTool.DECRYPT_SP_FILE /* 1024 */:
|
||||
return "ACTION_NEXT_HTML_ELEMENT";
|
||||
case 2048:
|
||||
return "ACTION_PREVIOUS_HTML_ELEMENT";
|
||||
case FileUtil.ZIP_BUFFER_SIZE /* 4096 */:
|
||||
return "ACTION_SCROLL_FORWARD";
|
||||
case UnityActivity.BLOCKLY_TYPE_NONE /* 8192 */:
|
||||
return "ACTION_SCROLL_BACKWARD";
|
||||
case 16384:
|
||||
return "ACTION_COPY";
|
||||
case 32768:
|
||||
return "ACTION_PASTE";
|
||||
case 65536:
|
||||
return "ACTION_CUT";
|
||||
case 131072:
|
||||
return "ACTION_SET_SELECTION";
|
||||
default:
|
||||
return "ACTION_UNKNOWN";
|
||||
}
|
||||
}
|
||||
|
||||
public void b(Rect rect) {
|
||||
this.a.getBoundsInScreen(rect);
|
||||
}
|
||||
|
||||
public CharSequence c() {
|
||||
return this.a.getContentDescription();
|
||||
}
|
||||
|
||||
public void d(boolean z) {
|
||||
this.a.setScrollable(z);
|
||||
}
|
||||
|
||||
public CharSequence e() {
|
||||
return this.a.getPackageName();
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
if (obj == null || AccessibilityNodeInfoCompat.class != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
AccessibilityNodeInfoCompat accessibilityNodeInfoCompat = (AccessibilityNodeInfoCompat) obj;
|
||||
AccessibilityNodeInfo accessibilityNodeInfo = this.a;
|
||||
if (accessibilityNodeInfo == null) {
|
||||
if (accessibilityNodeInfoCompat.a != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!accessibilityNodeInfo.equals(accessibilityNodeInfoCompat.a)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public CharSequence f() {
|
||||
return this.a.getText();
|
||||
}
|
||||
|
||||
public String g() {
|
||||
if (Build.VERSION.SDK_INT >= 18) {
|
||||
return this.a.getViewIdResourceName();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean h() {
|
||||
return this.a.isCheckable();
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
AccessibilityNodeInfo accessibilityNodeInfo = this.a;
|
||||
if (accessibilityNodeInfo == null) {
|
||||
return 0;
|
||||
}
|
||||
return accessibilityNodeInfo.hashCode();
|
||||
}
|
||||
|
||||
public boolean i() {
|
||||
return this.a.isChecked();
|
||||
}
|
||||
|
||||
public boolean j() {
|
||||
return this.a.isClickable();
|
||||
}
|
||||
|
||||
public boolean k() {
|
||||
return this.a.isEnabled();
|
||||
}
|
||||
|
||||
public boolean l() {
|
||||
return this.a.isFocusable();
|
||||
}
|
||||
|
||||
public boolean m() {
|
||||
return this.a.isFocused();
|
||||
}
|
||||
|
||||
public boolean n() {
|
||||
return this.a.isLongClickable();
|
||||
}
|
||||
|
||||
public boolean o() {
|
||||
return this.a.isPassword();
|
||||
}
|
||||
|
||||
public boolean p() {
|
||||
return this.a.isScrollable();
|
||||
}
|
||||
|
||||
public boolean q() {
|
||||
return this.a.isSelected();
|
||||
}
|
||||
|
||||
public AccessibilityNodeInfo r() {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(super.toString());
|
||||
Rect rect = new Rect();
|
||||
a(rect);
|
||||
sb.append("; boundsInParent: " + rect);
|
||||
b(rect);
|
||||
sb.append("; boundsInScreen: " + rect);
|
||||
sb.append("; packageName: ");
|
||||
sb.append(e());
|
||||
sb.append("; className: ");
|
||||
sb.append(b());
|
||||
sb.append("; text: ");
|
||||
sb.append(f());
|
||||
sb.append("; contentDescription: ");
|
||||
sb.append(c());
|
||||
sb.append("; viewId: ");
|
||||
sb.append(g());
|
||||
sb.append("; checkable: ");
|
||||
sb.append(h());
|
||||
sb.append("; checked: ");
|
||||
sb.append(i());
|
||||
sb.append("; focusable: ");
|
||||
sb.append(l());
|
||||
sb.append("; focused: ");
|
||||
sb.append(m());
|
||||
sb.append("; selected: ");
|
||||
sb.append(q());
|
||||
sb.append("; clickable: ");
|
||||
sb.append(j());
|
||||
sb.append("; longClickable: ");
|
||||
sb.append(n());
|
||||
sb.append("; enabled: ");
|
||||
sb.append(k());
|
||||
sb.append("; password: ");
|
||||
sb.append(o());
|
||||
sb.append("; scrollable: " + p());
|
||||
sb.append("; [");
|
||||
int a = a();
|
||||
while (a != 0) {
|
||||
int numberOfTrailingZeros = 1 << Integer.numberOfTrailingZeros(a);
|
||||
a &= ~numberOfTrailingZeros;
|
||||
sb.append(b(numberOfTrailingZeros));
|
||||
if (a != 0) {
|
||||
sb.append(", ");
|
||||
}
|
||||
}
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public int a() {
|
||||
return this.a.getActions();
|
||||
}
|
||||
|
||||
public void b(boolean z) {
|
||||
this.a.setChecked(z);
|
||||
}
|
||||
|
||||
public void c(boolean z) {
|
||||
if (Build.VERSION.SDK_INT >= 19) {
|
||||
this.a.setContentInvalid(z);
|
||||
}
|
||||
}
|
||||
|
||||
public void d(CharSequence charSequence) {
|
||||
this.a.setText(charSequence);
|
||||
}
|
||||
|
||||
public void e(boolean z) {
|
||||
if (Build.VERSION.SDK_INT >= 26) {
|
||||
this.a.setShowingHintText(z);
|
||||
} else {
|
||||
a(4, z);
|
||||
}
|
||||
}
|
||||
|
||||
public void a(int i) {
|
||||
this.a.addAction(i);
|
||||
}
|
||||
|
||||
public CharSequence b() {
|
||||
return this.a.getClassName();
|
||||
}
|
||||
|
||||
public Bundle d() {
|
||||
if (Build.VERSION.SDK_INT >= 19) {
|
||||
return this.a.getExtras();
|
||||
}
|
||||
return new Bundle();
|
||||
}
|
||||
|
||||
public void a(Rect rect) {
|
||||
this.a.getBoundsInParent(rect);
|
||||
}
|
||||
|
||||
public void b(Object obj) {
|
||||
if (Build.VERSION.SDK_INT >= 19) {
|
||||
this.a.setCollectionItemInfo(obj == null ? null : (AccessibilityNodeInfo.CollectionItemInfo) ((CollectionItemInfoCompat) obj).a);
|
||||
}
|
||||
}
|
||||
|
||||
public void c(CharSequence charSequence) {
|
||||
int i = Build.VERSION.SDK_INT;
|
||||
if (i >= 26) {
|
||||
this.a.setHintText(charSequence);
|
||||
} else if (i >= 19) {
|
||||
this.a.getExtras().putCharSequence("androidx.view.accessibility.AccessibilityNodeInfoCompat.HINT_TEXT_KEY", charSequence);
|
||||
}
|
||||
}
|
||||
|
||||
public void a(boolean z) {
|
||||
this.a.setCheckable(z);
|
||||
}
|
||||
|
||||
public void a(CharSequence charSequence) {
|
||||
this.a.setClassName(charSequence);
|
||||
}
|
||||
|
||||
public void b(CharSequence charSequence) {
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
this.a.setError(charSequence);
|
||||
}
|
||||
}
|
||||
|
||||
public void a(Object obj) {
|
||||
if (Build.VERSION.SDK_INT >= 19) {
|
||||
this.a.setCollectionInfo(obj == null ? null : (AccessibilityNodeInfo.CollectionInfo) ((CollectionInfoCompat) obj).a);
|
||||
}
|
||||
}
|
||||
|
||||
private void a(int i, boolean z) {
|
||||
Bundle d = d();
|
||||
if (d != null) {
|
||||
int i2 = d.getInt("androidx.view.accessibility.AccessibilityNodeInfoCompat.BOOLEAN_PROPERTY_KEY", 0) & (~i);
|
||||
if (!z) {
|
||||
i = 0;
|
||||
}
|
||||
d.putInt("androidx.view.accessibility.AccessibilityNodeInfoCompat.BOOLEAN_PROPERTY_KEY", i | i2);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
package androidx.core.view.accessibility;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class AccessibilityNodeProviderCompat {
|
||||
private final Object a;
|
||||
|
||||
public AccessibilityNodeProviderCompat(Object obj) {
|
||||
this.a = obj;
|
||||
}
|
||||
|
||||
public Object a() {
|
||||
return this.a;
|
||||
}
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
package androidx.core.view.accessibility;
|
||||
|
||||
import android.os.Build;
|
||||
import android.view.accessibility.AccessibilityRecord;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public class AccessibilityRecordCompat {
|
||||
public static void a(AccessibilityRecord accessibilityRecord, int i) {
|
||||
if (Build.VERSION.SDK_INT >= 15) {
|
||||
accessibilityRecord.setMaxScrollX(i);
|
||||
}
|
||||
}
|
||||
|
||||
public static void b(AccessibilityRecord accessibilityRecord, int i) {
|
||||
if (Build.VERSION.SDK_INT >= 15) {
|
||||
accessibilityRecord.setMaxScrollY(i);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user