Initial commit

This commit is contained in:
2025-05-13 19:24:51 +02:00
commit a950f49678
10604 changed files with 932663 additions and 0 deletions

View File

@@ -0,0 +1,121 @@
package androidx.core.view;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.accessibility.AccessibilityNodeProvider;
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
import androidx.core.view.accessibility.AccessibilityNodeProviderCompat;
/* loaded from: classes.dex */
public class AccessibilityDelegateCompat {
private static final View.AccessibilityDelegate b = new View.AccessibilityDelegate();
private final View.AccessibilityDelegate a = new AccessibilityDelegateAdapter(this);
private static final class AccessibilityDelegateAdapter extends View.AccessibilityDelegate {
private final AccessibilityDelegateCompat a;
AccessibilityDelegateAdapter(AccessibilityDelegateCompat accessibilityDelegateCompat) {
this.a = accessibilityDelegateCompat;
}
@Override // android.view.View.AccessibilityDelegate
public boolean dispatchPopulateAccessibilityEvent(View view, AccessibilityEvent accessibilityEvent) {
return this.a.a(view, accessibilityEvent);
}
@Override // android.view.View.AccessibilityDelegate
public AccessibilityNodeProvider getAccessibilityNodeProvider(View view) {
AccessibilityNodeProviderCompat a = this.a.a(view);
if (a != null) {
return (AccessibilityNodeProvider) a.a();
}
return null;
}
@Override // android.view.View.AccessibilityDelegate
public void onInitializeAccessibilityEvent(View view, AccessibilityEvent accessibilityEvent) {
this.a.b(view, accessibilityEvent);
}
@Override // android.view.View.AccessibilityDelegate
public void onInitializeAccessibilityNodeInfo(View view, AccessibilityNodeInfo accessibilityNodeInfo) {
this.a.a(view, AccessibilityNodeInfoCompat.a(accessibilityNodeInfo));
}
@Override // android.view.View.AccessibilityDelegate
public void onPopulateAccessibilityEvent(View view, AccessibilityEvent accessibilityEvent) {
this.a.c(view, accessibilityEvent);
}
@Override // android.view.View.AccessibilityDelegate
public boolean onRequestSendAccessibilityEvent(ViewGroup viewGroup, View view, AccessibilityEvent accessibilityEvent) {
return this.a.a(viewGroup, view, accessibilityEvent);
}
@Override // android.view.View.AccessibilityDelegate
public boolean performAccessibilityAction(View view, int i, Bundle bundle) {
return this.a.a(view, i, bundle);
}
@Override // android.view.View.AccessibilityDelegate
public void sendAccessibilityEvent(View view, int i) {
this.a.a(view, i);
}
@Override // android.view.View.AccessibilityDelegate
public void sendAccessibilityEventUnchecked(View view, AccessibilityEvent accessibilityEvent) {
this.a.d(view, accessibilityEvent);
}
}
View.AccessibilityDelegate a() {
return this.a;
}
public void b(View view, AccessibilityEvent accessibilityEvent) {
b.onInitializeAccessibilityEvent(view, accessibilityEvent);
}
public void c(View view, AccessibilityEvent accessibilityEvent) {
b.onPopulateAccessibilityEvent(view, accessibilityEvent);
}
public void d(View view, AccessibilityEvent accessibilityEvent) {
b.sendAccessibilityEventUnchecked(view, accessibilityEvent);
}
public void a(View view, int i) {
b.sendAccessibilityEvent(view, i);
}
public boolean a(View view, AccessibilityEvent accessibilityEvent) {
return b.dispatchPopulateAccessibilityEvent(view, accessibilityEvent);
}
public void a(View view, AccessibilityNodeInfoCompat accessibilityNodeInfoCompat) {
b.onInitializeAccessibilityNodeInfo(view, accessibilityNodeInfoCompat.r());
}
public boolean a(ViewGroup viewGroup, View view, AccessibilityEvent accessibilityEvent) {
return b.onRequestSendAccessibilityEvent(viewGroup, view, accessibilityEvent);
}
public AccessibilityNodeProviderCompat a(View view) {
AccessibilityNodeProvider accessibilityNodeProvider;
if (Build.VERSION.SDK_INT < 16 || (accessibilityNodeProvider = b.getAccessibilityNodeProvider(view)) == null) {
return null;
}
return new AccessibilityNodeProviderCompat(accessibilityNodeProvider);
}
public boolean a(View view, int i, Bundle bundle) {
if (Build.VERSION.SDK_INT >= 16) {
return b.performAccessibilityAction(view, i, bundle);
}
return false;
}
}

View File

@@ -0,0 +1,61 @@
package androidx.core.view;
import android.content.Context;
import android.util.Log;
import android.view.MenuItem;
import android.view.SubMenu;
import android.view.View;
/* loaded from: classes.dex */
public abstract class ActionProvider {
private VisibilityListener a;
public interface SubUiVisibilityListener {
}
public interface VisibilityListener {
void onActionProviderVisibilityChanged(boolean z);
}
public ActionProvider(Context context) {
}
public View a(MenuItem menuItem) {
return c();
}
public void a(SubMenu subMenu) {
}
public void a(SubUiVisibilityListener subUiVisibilityListener) {
}
public boolean a() {
return false;
}
public boolean b() {
return true;
}
public abstract View c();
public boolean d() {
return false;
}
public boolean e() {
return false;
}
public void f() {
this.a = null;
}
public void a(VisibilityListener visibilityListener) {
if (this.a != null && visibilityListener != null) {
Log.w("ActionProvider(support)", "setVisibilityListener: Setting a new ActionProvider.VisibilityListener when one is already set. Are you reusing this " + getClass().getSimpleName() + " instance while it is still in use somewhere else?");
}
this.a = visibilityListener;
}
}

View File

@@ -0,0 +1,204 @@
package androidx.core.view;
import android.content.Context;
import android.os.Build;
import android.os.Handler;
import android.os.Message;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.VelocityTracker;
import android.view.ViewConfiguration;
/* loaded from: classes.dex */
public final class GestureDetectorCompat {
private final GestureDetectorCompatImpl a;
interface GestureDetectorCompatImpl {
boolean a(MotionEvent motionEvent);
}
static class GestureDetectorCompatImplBase implements GestureDetectorCompatImpl {
private static final int v = ViewConfiguration.getLongPressTimeout();
private static final int w = ViewConfiguration.getTapTimeout();
private static final int x = ViewConfiguration.getDoubleTapTimeout();
private int a;
private int b;
private int c;
private int d;
private final Handler e;
final GestureDetector.OnGestureListener f;
GestureDetector.OnDoubleTapListener g;
boolean h;
boolean i;
private boolean j;
private boolean k;
private boolean l;
MotionEvent m;
private MotionEvent n;
private boolean o;
private float p;
private float q;
private float r;
private float s;
private boolean t;
private VelocityTracker u;
GestureDetectorCompatImplBase(Context context, GestureDetector.OnGestureListener onGestureListener, Handler handler) {
if (handler != null) {
this.e = new GestureHandler(handler);
} else {
this.e = new GestureHandler();
}
this.f = onGestureListener;
if (onGestureListener instanceof GestureDetector.OnDoubleTapListener) {
a((GestureDetector.OnDoubleTapListener) onGestureListener);
}
a(context);
}
private void a(Context context) {
if (context == null) {
throw new IllegalArgumentException("Context must not be null");
}
if (this.f == null) {
throw new IllegalArgumentException("OnGestureListener must not be null");
}
this.t = true;
ViewConfiguration viewConfiguration = ViewConfiguration.get(context);
int scaledTouchSlop = viewConfiguration.getScaledTouchSlop();
int scaledDoubleTapSlop = viewConfiguration.getScaledDoubleTapSlop();
this.c = viewConfiguration.getScaledMinimumFlingVelocity();
this.d = viewConfiguration.getScaledMaximumFlingVelocity();
this.a = scaledTouchSlop * scaledTouchSlop;
this.b = scaledDoubleTapSlop * scaledDoubleTapSlop;
}
private void b() {
this.e.removeMessages(1);
this.e.removeMessages(2);
this.e.removeMessages(3);
this.u.recycle();
this.u = null;
this.o = false;
this.h = false;
this.k = false;
this.l = false;
this.i = false;
if (this.j) {
this.j = false;
}
}
private void c() {
this.e.removeMessages(1);
this.e.removeMessages(2);
this.e.removeMessages(3);
this.o = false;
this.k = false;
this.l = false;
this.i = false;
if (this.j) {
this.j = false;
}
}
private class GestureHandler extends Handler {
GestureHandler() {
}
@Override // android.os.Handler
public void handleMessage(Message message) {
int i = message.what;
if (i == 1) {
GestureDetectorCompatImplBase gestureDetectorCompatImplBase = GestureDetectorCompatImplBase.this;
gestureDetectorCompatImplBase.f.onShowPress(gestureDetectorCompatImplBase.m);
return;
}
if (i == 2) {
GestureDetectorCompatImplBase.this.a();
return;
}
if (i != 3) {
throw new RuntimeException("Unknown message " + message);
}
GestureDetectorCompatImplBase gestureDetectorCompatImplBase2 = GestureDetectorCompatImplBase.this;
GestureDetector.OnDoubleTapListener onDoubleTapListener = gestureDetectorCompatImplBase2.g;
if (onDoubleTapListener != null) {
if (gestureDetectorCompatImplBase2.h) {
gestureDetectorCompatImplBase2.i = true;
} else {
onDoubleTapListener.onSingleTapConfirmed(gestureDetectorCompatImplBase2.m);
}
}
}
GestureHandler(Handler handler) {
super(handler.getLooper());
}
}
public void a(GestureDetector.OnDoubleTapListener onDoubleTapListener) {
this.g = onDoubleTapListener;
}
/* JADX WARN: Removed duplicated region for block: B:114:0x0208 */
/* JADX WARN: Removed duplicated region for block: B:117:0x021f */
@Override // androidx.core.view.GestureDetectorCompat.GestureDetectorCompatImpl
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct code enable 'Show inconsistent code' option in preferences
*/
public boolean a(android.view.MotionEvent r13) {
/*
Method dump skipped, instructions count: 591
To view this dump change 'Code comments level' option to 'DEBUG'
*/
throw new UnsupportedOperationException("Method not decompiled: androidx.core.view.GestureDetectorCompat.GestureDetectorCompatImplBase.a(android.view.MotionEvent):boolean");
}
private boolean a(MotionEvent motionEvent, MotionEvent motionEvent2, MotionEvent motionEvent3) {
if (!this.l || motionEvent3.getEventTime() - motionEvent2.getEventTime() > x) {
return false;
}
int x2 = ((int) motionEvent.getX()) - ((int) motionEvent3.getX());
int y = ((int) motionEvent.getY()) - ((int) motionEvent3.getY());
return (x2 * x2) + (y * y) < this.b;
}
void a() {
this.e.removeMessages(3);
this.i = false;
this.j = true;
this.f.onLongPress(this.m);
}
}
static class GestureDetectorCompatImplJellybeanMr2 implements GestureDetectorCompatImpl {
private final GestureDetector a;
GestureDetectorCompatImplJellybeanMr2(Context context, GestureDetector.OnGestureListener onGestureListener, Handler handler) {
this.a = new GestureDetector(context, onGestureListener, handler);
}
@Override // androidx.core.view.GestureDetectorCompat.GestureDetectorCompatImpl
public boolean a(MotionEvent motionEvent) {
return this.a.onTouchEvent(motionEvent);
}
}
public GestureDetectorCompat(Context context, GestureDetector.OnGestureListener onGestureListener) {
this(context, onGestureListener, null);
}
public boolean a(MotionEvent motionEvent) {
return this.a.a(motionEvent);
}
public GestureDetectorCompat(Context context, GestureDetector.OnGestureListener onGestureListener, Handler handler) {
if (Build.VERSION.SDK_INT > 17) {
this.a = new GestureDetectorCompatImplJellybeanMr2(context, onGestureListener, handler);
} else {
this.a = new GestureDetectorCompatImplBase(context, onGestureListener, handler);
}
}
}

View File

@@ -0,0 +1,20 @@
package androidx.core.view;
import android.graphics.Rect;
import android.os.Build;
import android.view.Gravity;
/* loaded from: classes.dex */
public final class GravityCompat {
public static void a(int i, int i2, int i3, Rect rect, Rect rect2, int i4) {
if (Build.VERSION.SDK_INT >= 17) {
Gravity.apply(i, i2, i3, rect, rect2, i4);
} else {
Gravity.apply(i, i2, i3, rect, rect2);
}
}
public static int a(int i, int i2) {
return Build.VERSION.SDK_INT >= 17 ? Gravity.getAbsoluteGravity(i, i2) : i & (-8388609);
}
}

View File

@@ -0,0 +1,109 @@
package androidx.core.view;
import android.app.ActionBar;
import android.app.Activity;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Build;
import android.view.KeyEvent;
import android.view.View;
import android.view.Window;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/* loaded from: classes.dex */
public class KeyEventDispatcher {
private static boolean a = false;
private static Method b = null;
private static boolean c = false;
private static Field d;
public interface Component {
boolean superDispatchKeyEvent(KeyEvent keyEvent);
}
public static boolean a(View view, KeyEvent keyEvent) {
return ViewCompat.b(view, keyEvent);
}
public static boolean a(Component component, View view, Window.Callback callback, KeyEvent keyEvent) {
if (component == null) {
return false;
}
return Build.VERSION.SDK_INT >= 28 ? component.superDispatchKeyEvent(keyEvent) : callback instanceof Activity ? a((Activity) callback, keyEvent) : callback instanceof Dialog ? a((Dialog) callback, keyEvent) : (view != null && ViewCompat.a(view, keyEvent)) || component.superDispatchKeyEvent(keyEvent);
}
private static boolean a(ActionBar actionBar, KeyEvent keyEvent) {
if (!a) {
try {
b = actionBar.getClass().getMethod("onMenuKeyEvent", KeyEvent.class);
} catch (NoSuchMethodException unused) {
}
a = true;
}
Method method = b;
if (method != null) {
try {
return ((Boolean) method.invoke(actionBar, keyEvent)).booleanValue();
} catch (IllegalAccessException | InvocationTargetException unused2) {
}
}
return false;
}
private static boolean a(Activity activity, KeyEvent keyEvent) {
activity.onUserInteraction();
Window window = activity.getWindow();
if (window.hasFeature(8)) {
ActionBar actionBar = activity.getActionBar();
if (keyEvent.getKeyCode() == 82 && actionBar != null && a(actionBar, keyEvent)) {
return true;
}
}
if (window.superDispatchKeyEvent(keyEvent)) {
return true;
}
View decorView = window.getDecorView();
if (ViewCompat.a(decorView, keyEvent)) {
return true;
}
return keyEvent.dispatch(activity, decorView != null ? decorView.getKeyDispatcherState() : null, activity);
}
private static DialogInterface.OnKeyListener a(Dialog dialog) {
if (!c) {
try {
d = Dialog.class.getDeclaredField("mOnKeyListener");
d.setAccessible(true);
} catch (NoSuchFieldException unused) {
}
c = true;
}
Field field = d;
if (field == null) {
return null;
}
try {
return (DialogInterface.OnKeyListener) field.get(dialog);
} catch (IllegalAccessException unused2) {
return null;
}
}
private static boolean a(Dialog dialog, KeyEvent keyEvent) {
DialogInterface.OnKeyListener a2 = a(dialog);
if (a2 != null && a2.onKey(dialog, keyEvent.getKeyCode(), keyEvent)) {
return true;
}
Window window = dialog.getWindow();
if (window.superDispatchKeyEvent(keyEvent)) {
return true;
}
View decorView = window.getDecorView();
if (ViewCompat.a(decorView, keyEvent)) {
return true;
}
return keyEvent.dispatch(dialog, decorView != null ? decorView.getKeyDispatcherState() : null, dialog);
}
}

View File

@@ -0,0 +1,44 @@
package androidx.core.view;
import android.os.Build;
import android.util.Log;
import android.view.LayoutInflater;
import java.lang.reflect.Field;
/* loaded from: classes.dex */
public final class LayoutInflaterCompat {
private static Field a;
private static boolean b;
private static void a(LayoutInflater layoutInflater, LayoutInflater.Factory2 factory2) {
if (!b) {
try {
a = LayoutInflater.class.getDeclaredField("mFactory2");
a.setAccessible(true);
} catch (NoSuchFieldException e) {
Log.e("LayoutInflaterCompatHC", "forceSetFactory2 Could not find field 'mFactory2' on class " + LayoutInflater.class.getName() + "; inflation may have unexpected results.", e);
}
b = true;
}
Field field = a;
if (field != null) {
try {
field.set(layoutInflater, factory2);
} catch (IllegalAccessException e2) {
Log.e("LayoutInflaterCompatHC", "forceSetFactory2 could not set the Factory2 on LayoutInflater " + layoutInflater + "; inflation may have unexpected results.", e2);
}
}
}
public static void b(LayoutInflater layoutInflater, LayoutInflater.Factory2 factory2) {
layoutInflater.setFactory2(factory2);
if (Build.VERSION.SDK_INT < 21) {
LayoutInflater.Factory factory = layoutInflater.getFactory();
if (factory instanceof LayoutInflater.Factory2) {
a(layoutInflater, (LayoutInflater.Factory2) factory);
} else {
a(layoutInflater, factory2);
}
}
}
}

View File

@@ -0,0 +1,23 @@
package androidx.core.view;
import android.os.Build;
import android.view.ViewGroup;
/* loaded from: classes.dex */
public final class MarginLayoutParamsCompat {
public static int a(ViewGroup.MarginLayoutParams marginLayoutParams) {
return Build.VERSION.SDK_INT >= 17 ? marginLayoutParams.getMarginEnd() : marginLayoutParams.rightMargin;
}
public static int b(ViewGroup.MarginLayoutParams marginLayoutParams) {
return Build.VERSION.SDK_INT >= 17 ? marginLayoutParams.getMarginStart() : marginLayoutParams.leftMargin;
}
public static void a(ViewGroup.MarginLayoutParams marginLayoutParams, int i) {
if (Build.VERSION.SDK_INT >= 17) {
marginLayoutParams.setMarginEnd(i);
} else {
marginLayoutParams.rightMargin = i;
}
}
}

View File

@@ -0,0 +1,67 @@
package androidx.core.view;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
import android.os.Build;
import android.util.Log;
import android.view.MenuItem;
import androidx.core.internal.view.SupportMenuItem;
/* loaded from: classes.dex */
public final class MenuItemCompat {
public static MenuItem a(MenuItem menuItem, ActionProvider actionProvider) {
if (menuItem instanceof SupportMenuItem) {
return ((SupportMenuItem) menuItem).a(actionProvider);
}
Log.w("MenuItemCompat", "setActionProvider: item does not implement SupportMenuItem; ignoring");
return menuItem;
}
public static void b(MenuItem menuItem, CharSequence charSequence) {
if (menuItem instanceof SupportMenuItem) {
((SupportMenuItem) menuItem).setTooltipText(charSequence);
} else if (Build.VERSION.SDK_INT >= 26) {
menuItem.setTooltipText(charSequence);
}
}
public static void a(MenuItem menuItem, CharSequence charSequence) {
if (menuItem instanceof SupportMenuItem) {
((SupportMenuItem) menuItem).setContentDescription(charSequence);
} else if (Build.VERSION.SDK_INT >= 26) {
menuItem.setContentDescription(charSequence);
}
}
public static void b(MenuItem menuItem, char c, int i) {
if (menuItem instanceof SupportMenuItem) {
((SupportMenuItem) menuItem).setNumericShortcut(c, i);
} else if (Build.VERSION.SDK_INT >= 26) {
menuItem.setNumericShortcut(c, i);
}
}
public static void a(MenuItem menuItem, char c, int i) {
if (menuItem instanceof SupportMenuItem) {
((SupportMenuItem) menuItem).setAlphabeticShortcut(c, i);
} else if (Build.VERSION.SDK_INT >= 26) {
menuItem.setAlphabeticShortcut(c, i);
}
}
public static void a(MenuItem menuItem, ColorStateList colorStateList) {
if (menuItem instanceof SupportMenuItem) {
((SupportMenuItem) menuItem).setIconTintList(colorStateList);
} else if (Build.VERSION.SDK_INT >= 26) {
menuItem.setIconTintList(colorStateList);
}
}
public static void a(MenuItem menuItem, PorterDuff.Mode mode) {
if (menuItem instanceof SupportMenuItem) {
((SupportMenuItem) menuItem).setIconTintMode(mode);
} else if (Build.VERSION.SDK_INT >= 26) {
menuItem.setIconTintMode(mode);
}
}
}

View File

@@ -0,0 +1,20 @@
package androidx.core.view;
import android.view.MotionEvent;
/* loaded from: classes.dex */
public final class MotionEventCompat {
@Deprecated
public static int a(MotionEvent motionEvent) {
return motionEvent.getActionMasked();
}
@Deprecated
public static int b(MotionEvent motionEvent) {
return motionEvent.getPointerCount();
}
public static boolean a(MotionEvent motionEvent, int i) {
return (motionEvent.getSource() & i) == i;
}
}

View File

@@ -0,0 +1,8 @@
package androidx.core.view;
/* loaded from: classes.dex */
public interface NestedScrollingChild {
boolean isNestedScrollingEnabled();
void stopNestedScroll();
}

View File

@@ -0,0 +1,6 @@
package androidx.core.view;
/* loaded from: classes.dex */
public interface NestedScrollingChild2 extends NestedScrollingChild {
void a(int i);
}

View File

@@ -0,0 +1,188 @@
package androidx.core.view;
import android.view.View;
import android.view.ViewParent;
/* loaded from: classes.dex */
public class NestedScrollingChildHelper {
private ViewParent a;
private ViewParent b;
private final View c;
private boolean d;
private int[] e;
public NestedScrollingChildHelper(View view) {
this.c = view;
}
private ViewParent d(int i) {
if (i == 0) {
return this.a;
}
if (i != 1) {
return null;
}
return this.b;
}
public void a(boolean z) {
if (this.d) {
ViewCompat.C(this.c);
}
this.d = z;
}
public boolean b() {
return this.d;
}
public void c() {
c(0);
}
public boolean b(int i) {
return a(i, 0);
}
public void c(int i) {
ViewParent d = d(i);
if (d != null) {
ViewParentCompat.a(d, this.c, i);
a(i, (ViewParent) null);
}
}
public boolean a() {
return a(0);
}
public boolean a(int i) {
return d(i) != null;
}
public boolean a(int i, int i2) {
if (a(i2)) {
return true;
}
if (!b()) {
return false;
}
View view = this.c;
for (ViewParent parent = this.c.getParent(); parent != null; parent = parent.getParent()) {
if (ViewParentCompat.b(parent, view, this.c, i, i2)) {
a(i2, parent);
ViewParentCompat.a(parent, view, this.c, i, i2);
return true;
}
if (parent instanceof View) {
view = (View) parent;
}
}
return false;
}
public boolean a(int i, int i2, int i3, int i4, int[] iArr) {
return a(i, i2, i3, i4, iArr, 0);
}
public boolean a(int i, int i2, int i3, int i4, int[] iArr, int i5) {
ViewParent d;
int i6;
int i7;
if (!b() || (d = d(i5)) == null) {
return false;
}
if (i == 0 && i2 == 0 && i3 == 0 && i4 == 0) {
if (iArr != null) {
iArr[0] = 0;
iArr[1] = 0;
}
return false;
}
if (iArr != null) {
this.c.getLocationInWindow(iArr);
i6 = iArr[0];
i7 = iArr[1];
} else {
i6 = 0;
i7 = 0;
}
ViewParentCompat.a(d, this.c, i, i2, i3, i4, i5);
if (iArr != null) {
this.c.getLocationInWindow(iArr);
iArr[0] = iArr[0] - i6;
iArr[1] = iArr[1] - i7;
}
return true;
}
public boolean a(int i, int i2, int[] iArr, int[] iArr2) {
return a(i, i2, iArr, iArr2, 0);
}
public boolean a(int i, int i2, int[] iArr, int[] iArr2, int i3) {
ViewParent d;
int i4;
int i5;
if (!b() || (d = d(i3)) == null) {
return false;
}
if (i == 0 && i2 == 0) {
if (iArr2 != null) {
iArr2[0] = 0;
iArr2[1] = 0;
}
return false;
}
if (iArr2 != null) {
this.c.getLocationInWindow(iArr2);
i4 = iArr2[0];
i5 = iArr2[1];
} else {
i4 = 0;
i5 = 0;
}
if (iArr == null) {
if (this.e == null) {
this.e = new int[2];
}
iArr = this.e;
}
iArr[0] = 0;
iArr[1] = 0;
ViewParentCompat.a(d, this.c, i, i2, iArr, i3);
if (iArr2 != null) {
this.c.getLocationInWindow(iArr2);
iArr2[0] = iArr2[0] - i4;
iArr2[1] = iArr2[1] - i5;
}
return (iArr[0] == 0 && iArr[1] == 0) ? false : true;
}
public boolean a(float f, float f2, boolean z) {
ViewParent d;
if (!b() || (d = d(0)) == null) {
return false;
}
return ViewParentCompat.a(d, this.c, f, f2, z);
}
public boolean a(float f, float f2) {
ViewParent d;
if (!b() || (d = d(0)) == null) {
return false;
}
return ViewParentCompat.a(d, this.c, f, f2);
}
private void a(int i, ViewParent viewParent) {
if (i == 0) {
this.a = viewParent;
} else {
if (i != 1) {
return;
}
this.b = viewParent;
}
}
}

View File

@@ -0,0 +1,20 @@
package androidx.core.view;
import android.view.View;
/* loaded from: classes.dex */
public interface NestedScrollingParent {
boolean onNestedFling(View view, float f, float f2, boolean z);
boolean onNestedPreFling(View view, float f, float f2);
void onNestedPreScroll(View view, int i, int i2, int[] iArr);
void onNestedScroll(View view, int i, int i2, int i3, int i4);
void onNestedScrollAccepted(View view, View view2, int i);
boolean onStartNestedScroll(View view, View view2, int i);
void onStopNestedScroll(View view);
}

View File

@@ -0,0 +1,16 @@
package androidx.core.view;
import android.view.View;
/* loaded from: classes.dex */
public interface NestedScrollingParent2 extends NestedScrollingParent {
void a(View view, int i);
void a(View view, int i, int i2, int i3, int i4, int i5);
void a(View view, int i, int i2, int[] iArr, int i3);
boolean a(View view, View view2, int i, int i2);
void b(View view, View view2, int i, int i2);
}

View File

@@ -0,0 +1,28 @@
package androidx.core.view;
import android.view.View;
import android.view.ViewGroup;
/* loaded from: classes.dex */
public class NestedScrollingParentHelper {
private int a;
public NestedScrollingParentHelper(ViewGroup viewGroup) {
}
public void a(View view, View view2, int i) {
a(view, view2, i, 0);
}
public void a(View view, View view2, int i, int i2) {
this.a = i;
}
public int a() {
return this.a;
}
public void a(View view, int i) {
this.a = 0;
}
}

View File

@@ -0,0 +1,8 @@
package androidx.core.view;
import android.view.View;
/* loaded from: classes.dex */
public interface OnApplyWindowInsetsListener {
WindowInsetsCompat a(View view, WindowInsetsCompat windowInsetsCompat);
}

View File

@@ -0,0 +1,22 @@
package androidx.core.view;
import android.content.Context;
import android.os.Build;
import android.view.PointerIcon;
/* loaded from: classes.dex */
public final class PointerIconCompat {
private Object a;
private PointerIconCompat(Object obj) {
this.a = obj;
}
public Object a() {
return this.a;
}
public static PointerIconCompat a(Context context, int i) {
return Build.VERSION.SDK_INT >= 24 ? new PointerIconCompat(PointerIcon.getSystemIcon(context, i)) : new PointerIconCompat(null);
}
}

View File

@@ -0,0 +1,5 @@
package androidx.core.view;
/* loaded from: classes.dex */
public interface ScrollingView {
}

View File

@@ -0,0 +1,15 @@
package androidx.core.view;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
/* loaded from: classes.dex */
public interface TintableBackgroundView {
ColorStateList getSupportBackgroundTintList();
PorterDuff.Mode getSupportBackgroundTintMode();
void setSupportBackgroundTintList(ColorStateList colorStateList);
void setSupportBackgroundTintMode(PorterDuff.Mode mode);
}

View File

@@ -0,0 +1,795 @@
package androidx.core.view;
import android.animation.ValueAnimator;
import android.annotation.SuppressLint;
import android.content.res.ColorStateList;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.util.SparseArray;
import android.view.Display;
import android.view.KeyEvent;
import android.view.PointerIcon;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.WindowInsets;
import android.view.WindowManager;
import androidx.core.R$id;
import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.WeakHashMap;
import java.util.concurrent.atomic.AtomicInteger;
/* loaded from: classes.dex */
public class ViewCompat {
private static Field a;
private static boolean b;
private static Field c;
private static boolean d;
private static WeakHashMap<View, String> e;
private static WeakHashMap<View, ViewPropertyAnimatorCompat> f;
private static Field g;
private static boolean h;
private static ThreadLocal<Rect> i;
public interface OnUnhandledKeyEventListenerCompat {
boolean a(View view, KeyEvent keyEvent);
}
static {
new AtomicInteger(1);
f = null;
h = false;
}
public static void A(View view) {
if (Build.VERSION.SDK_INT >= 16) {
view.postInvalidateOnAnimation();
} else {
view.postInvalidate();
}
}
public static void B(View view) {
int i2 = Build.VERSION.SDK_INT;
if (i2 >= 20) {
view.requestApplyInsets();
} else if (i2 >= 16) {
view.requestFitSystemWindows();
}
}
/* JADX WARN: Multi-variable type inference failed */
public static void C(View view) {
if (Build.VERSION.SDK_INT >= 21) {
view.stopNestedScroll();
} else if (view instanceof NestedScrollingChild) {
((NestedScrollingChild) view).stopNestedScroll();
}
}
private static void D(View view) {
float translationY = view.getTranslationY();
view.setTranslationY(1.0f + translationY);
view.setTranslationY(translationY);
}
private static Rect a() {
if (i == null) {
i = new ThreadLocal<>();
}
Rect rect = i.get();
if (rect == null) {
rect = new Rect();
i.set(rect);
}
rect.setEmpty();
return rect;
}
public static void b(View view, boolean z) {
if (Build.VERSION.SDK_INT >= 16) {
view.setHasTransientState(z);
}
}
@Deprecated
public static void c(View view, float f2) {
view.setPivotX(f2);
}
@Deprecated
public static void d(View view, float f2) {
view.setPivotY(f2);
}
public static void e(View view, int i2) {
if (Build.VERSION.SDK_INT >= 19) {
view.setAccessibilityLiveRegion(i2);
}
}
public static void f(View view, int i2) {
int i3 = Build.VERSION.SDK_INT;
if (i3 >= 19) {
view.setImportantForAccessibility(i2);
} else if (i3 >= 16) {
if (i2 == 4) {
i2 = 2;
}
view.setImportantForAccessibility(i2);
}
}
public static void g(View view, int i2) {
if (Build.VERSION.SDK_INT >= 26) {
view.setImportantForAutofill(i2);
}
}
@Deprecated
public static void h(View view, float f2) {
view.setScaleX(f2);
}
public static int i(View view) {
if (Build.VERSION.SDK_INT >= 16) {
return view.getImportantForAccessibility();
}
return 0;
}
@SuppressLint({"InlinedApi"})
public static int j(View view) {
if (Build.VERSION.SDK_INT >= 26) {
return view.getImportantForAutofill();
}
return 0;
}
public static int k(View view) {
if (Build.VERSION.SDK_INT >= 17) {
return view.getLayoutDirection();
}
return 0;
}
public static int l(View view) {
if (Build.VERSION.SDK_INT >= 16) {
return view.getMinimumHeight();
}
if (!d) {
try {
c = View.class.getDeclaredField("mMinHeight");
c.setAccessible(true);
} catch (NoSuchFieldException unused) {
}
d = true;
}
Field field = c;
if (field == null) {
return 0;
}
try {
return ((Integer) field.get(view)).intValue();
} catch (Exception unused2) {
return 0;
}
}
public static int m(View view) {
if (Build.VERSION.SDK_INT >= 16) {
return view.getMinimumWidth();
}
if (!b) {
try {
a = View.class.getDeclaredField("mMinWidth");
a.setAccessible(true);
} catch (NoSuchFieldException unused) {
}
b = true;
}
Field field = a;
if (field == null) {
return 0;
}
try {
return ((Integer) field.get(view)).intValue();
} catch (Exception unused2) {
return 0;
}
}
public static int n(View view) {
return Build.VERSION.SDK_INT >= 17 ? view.getPaddingEnd() : view.getPaddingRight();
}
public static int o(View view) {
return Build.VERSION.SDK_INT >= 17 ? view.getPaddingStart() : view.getPaddingLeft();
}
public static String p(View view) {
if (Build.VERSION.SDK_INT >= 21) {
return view.getTransitionName();
}
WeakHashMap<View, String> weakHashMap = e;
if (weakHashMap == null) {
return null;
}
return weakHashMap.get(view);
}
public static int q(View view) {
if (Build.VERSION.SDK_INT >= 16) {
return view.getWindowSystemUiVisibility();
}
return 0;
}
public static float r(View view) {
if (Build.VERSION.SDK_INT >= 21) {
return view.getZ();
}
return 0.0f;
}
public static boolean s(View view) {
if (h) {
return false;
}
if (g == null) {
try {
g = View.class.getDeclaredField("mAccessibilityDelegate");
g.setAccessible(true);
} catch (Throwable unused) {
h = true;
return false;
}
}
try {
return g.get(view) != null;
} catch (Throwable unused2) {
h = true;
return false;
}
}
public static boolean t(View view) {
if (Build.VERSION.SDK_INT >= 15) {
return view.hasOnClickListeners();
}
return false;
}
public static boolean u(View view) {
if (Build.VERSION.SDK_INT >= 16) {
return view.hasOverlappingRendering();
}
return true;
}
public static boolean v(View view) {
if (Build.VERSION.SDK_INT >= 16) {
return view.hasTransientState();
}
return false;
}
public static boolean w(View view) {
return Build.VERSION.SDK_INT >= 19 ? view.isAttachedToWindow() : view.getWindowToken() != null;
}
public static boolean x(View view) {
return Build.VERSION.SDK_INT >= 19 ? view.isLaidOut() : view.getWidth() > 0 && view.getHeight() > 0;
}
/* JADX WARN: Multi-variable type inference failed */
public static boolean y(View view) {
if (Build.VERSION.SDK_INT >= 21) {
return view.isNestedScrollingEnabled();
}
if (view instanceof NestedScrollingChild) {
return ((NestedScrollingChild) view).isNestedScrollingEnabled();
}
return false;
}
public static boolean z(View view) {
if (Build.VERSION.SDK_INT >= 17) {
return view.isPaddingRelative();
}
return false;
}
/* JADX WARN: Multi-variable type inference failed */
public static ColorStateList c(View view) {
if (Build.VERSION.SDK_INT >= 21) {
return view.getBackgroundTintList();
}
if (view instanceof TintableBackgroundView) {
return ((TintableBackgroundView) view).getSupportBackgroundTintList();
}
return null;
}
/* JADX WARN: Multi-variable type inference failed */
public static PorterDuff.Mode d(View view) {
if (Build.VERSION.SDK_INT >= 21) {
return view.getBackgroundTintMode();
}
if (view instanceof TintableBackgroundView) {
return ((TintableBackgroundView) view).getSupportBackgroundTintMode();
}
return null;
}
public static boolean h(View view) {
if (Build.VERSION.SDK_INT >= 16) {
return view.getFitsSystemWindows();
}
return false;
}
static class UnhandledKeyEventManager {
private static final ArrayList<WeakReference<View>> d = new ArrayList<>();
private WeakHashMap<View, Boolean> a = null;
private SparseArray<WeakReference<View>> b = null;
private WeakReference<KeyEvent> c = null;
UnhandledKeyEventManager() {
}
private SparseArray<WeakReference<View>> a() {
if (this.b == null) {
this.b = new SparseArray<>();
}
return this.b;
}
private View b(View view, KeyEvent keyEvent) {
WeakHashMap<View, Boolean> weakHashMap = this.a;
if (weakHashMap != null && weakHashMap.containsKey(view)) {
if (view instanceof ViewGroup) {
ViewGroup viewGroup = (ViewGroup) view;
for (int childCount = viewGroup.getChildCount() - 1; childCount >= 0; childCount--) {
View b = b(viewGroup.getChildAt(childCount), keyEvent);
if (b != null) {
return b;
}
}
}
if (c(view, keyEvent)) {
return view;
}
}
return null;
}
private boolean c(View view, KeyEvent keyEvent) {
ArrayList arrayList = (ArrayList) view.getTag(R$id.tag_unhandled_key_listeners);
if (arrayList == null) {
return false;
}
for (int size = arrayList.size() - 1; size >= 0; size--) {
if (((OnUnhandledKeyEventListenerCompat) arrayList.get(size)).a(view, keyEvent)) {
return true;
}
}
return false;
}
static UnhandledKeyEventManager a(View view) {
UnhandledKeyEventManager unhandledKeyEventManager = (UnhandledKeyEventManager) view.getTag(R$id.tag_unhandled_key_event_manager);
if (unhandledKeyEventManager != null) {
return unhandledKeyEventManager;
}
UnhandledKeyEventManager unhandledKeyEventManager2 = new UnhandledKeyEventManager();
view.setTag(R$id.tag_unhandled_key_event_manager, unhandledKeyEventManager2);
return unhandledKeyEventManager2;
}
private void b() {
WeakHashMap<View, Boolean> weakHashMap = this.a;
if (weakHashMap != null) {
weakHashMap.clear();
}
if (d.isEmpty()) {
return;
}
synchronized (d) {
if (this.a == null) {
this.a = new WeakHashMap<>();
}
for (int size = d.size() - 1; size >= 0; size--) {
View view = d.get(size).get();
if (view == null) {
d.remove(size);
} else {
this.a.put(view, Boolean.TRUE);
for (ViewParent parent = view.getParent(); parent instanceof View; parent = parent.getParent()) {
this.a.put((View) parent, Boolean.TRUE);
}
}
}
}
}
boolean a(View view, KeyEvent keyEvent) {
if (keyEvent.getAction() == 0) {
b();
}
View b = b(view, keyEvent);
if (keyEvent.getAction() == 0) {
int keyCode = keyEvent.getKeyCode();
if (b != null && !KeyEvent.isModifierKey(keyCode)) {
a().put(keyCode, new WeakReference<>(b));
}
}
return b != null;
}
boolean a(KeyEvent keyEvent) {
int indexOfKey;
WeakReference<KeyEvent> weakReference = this.c;
if (weakReference != null && weakReference.get() == keyEvent) {
return false;
}
this.c = new WeakReference<>(keyEvent);
WeakReference<View> weakReference2 = null;
SparseArray<WeakReference<View>> a = a();
if (keyEvent.getAction() == 1 && (indexOfKey = a.indexOfKey(keyEvent.getKeyCode())) >= 0) {
weakReference2 = a.valueAt(indexOfKey);
a.removeAt(indexOfKey);
}
if (weakReference2 == null) {
weakReference2 = a.get(keyEvent.getKeyCode());
}
if (weakReference2 == null) {
return false;
}
View view = weakReference2.get();
if (view != null && ViewCompat.w(view)) {
c(view, keyEvent);
}
return true;
}
}
public static int b(View view) {
if (Build.VERSION.SDK_INT >= 19) {
return view.getAccessibilityLiveRegion();
}
return 0;
}
@Deprecated
public static void e(View view, float f2) {
view.setRotation(f2);
}
@Deprecated
public static void g(View view, float f2) {
view.setRotationY(f2);
}
@Deprecated
public static void i(View view, float f2) {
view.setScaleY(f2);
}
@Deprecated
public static void j(View view, float f2) {
view.setTranslationX(f2);
}
@Deprecated
public static void k(View view, float f2) {
view.setTranslationY(f2);
}
public static Rect e(View view) {
if (Build.VERSION.SDK_INT >= 18) {
return view.getClipBounds();
}
return null;
}
@Deprecated
public static void f(View view, float f2) {
view.setRotationX(f2);
}
public static float g(View view) {
if (Build.VERSION.SDK_INT >= 21) {
return view.getElevation();
}
return 0.0f;
}
/* JADX WARN: Multi-variable type inference failed */
public static void h(View view, int i2) {
if (view instanceof NestedScrollingChild2) {
((NestedScrollingChild2) view).a(i2);
} else if (i2 == 0) {
C(view);
}
}
public static void b(View view, float f2) {
if (Build.VERSION.SDK_INT >= 21) {
view.setElevation(f2);
}
}
public static Display f(View view) {
if (Build.VERSION.SDK_INT >= 17) {
return view.getDisplay();
}
if (w(view)) {
return ((WindowManager) view.getContext().getSystemService("window")).getDefaultDisplay();
}
return null;
}
public static void c(View view, int i2) {
int i3 = Build.VERSION.SDK_INT;
if (i3 >= 23) {
view.offsetLeftAndRight(i2);
return;
}
if (i3 >= 21) {
Rect a2 = a();
boolean z = false;
Object parent = view.getParent();
if (parent instanceof View) {
View view2 = (View) parent;
a2.set(view2.getLeft(), view2.getTop(), view2.getRight(), view2.getBottom());
z = !a2.intersects(view.getLeft(), view.getTop(), view.getRight(), view.getBottom());
}
a(view, i2);
if (z && a2.intersect(view.getLeft(), view.getTop(), view.getRight(), view.getBottom())) {
((View) parent).invalidate(a2);
return;
}
return;
}
a(view, i2);
}
public static void d(View view, int i2) {
int i3 = Build.VERSION.SDK_INT;
if (i3 >= 23) {
view.offsetTopAndBottom(i2);
return;
}
if (i3 >= 21) {
Rect a2 = a();
boolean z = false;
Object parent = view.getParent();
if (parent instanceof View) {
View view2 = (View) parent;
a2.set(view2.getLeft(), view2.getTop(), view2.getRight(), view2.getBottom());
z = !a2.intersects(view.getLeft(), view.getTop(), view.getRight(), view.getBottom());
}
b(view, i2);
if (z && a2.intersect(view.getLeft(), view.getTop(), view.getRight(), view.getBottom())) {
((View) parent).invalidate(a2);
return;
}
return;
}
b(view, i2);
}
public static void a(View view, AccessibilityDelegateCompat accessibilityDelegateCompat) {
view.setAccessibilityDelegate(accessibilityDelegateCompat == null ? null : accessibilityDelegateCompat.a());
}
public static WindowInsetsCompat b(View view, WindowInsetsCompat windowInsetsCompat) {
if (Build.VERSION.SDK_INT < 21) {
return windowInsetsCompat;
}
WindowInsets windowInsets = (WindowInsets) WindowInsetsCompat.a(windowInsetsCompat);
WindowInsets onApplyWindowInsets = view.onApplyWindowInsets(windowInsets);
if (onApplyWindowInsets != windowInsets) {
windowInsets = new WindowInsets(onApplyWindowInsets);
}
return WindowInsetsCompat.a(windowInsets);
}
public static void a(View view, Runnable runnable) {
if (Build.VERSION.SDK_INT >= 16) {
view.postOnAnimation(runnable);
} else {
view.postDelayed(runnable, ValueAnimator.getFrameDelay());
}
}
public static void a(View view, Runnable runnable, long j) {
if (Build.VERSION.SDK_INT >= 16) {
view.postOnAnimationDelayed(runnable, j);
} else {
view.postDelayed(runnable, ValueAnimator.getFrameDelay() + j);
}
}
private static void b(View view, int i2) {
view.offsetTopAndBottom(i2);
if (view.getVisibility() == 0) {
D(view);
Object parent = view.getParent();
if (parent instanceof View) {
D((View) parent);
}
}
}
public static void a(View view, int i2, int i3, int i4, int i5) {
if (Build.VERSION.SDK_INT >= 17) {
view.setPaddingRelative(i2, i3, i4, i5);
} else {
view.setPadding(i2, i3, i4, i5);
}
}
public static ViewPropertyAnimatorCompat a(View view) {
if (f == null) {
f = new WeakHashMap<>();
}
ViewPropertyAnimatorCompat viewPropertyAnimatorCompat = f.get(view);
if (viewPropertyAnimatorCompat != null) {
return viewPropertyAnimatorCompat;
}
ViewPropertyAnimatorCompat viewPropertyAnimatorCompat2 = new ViewPropertyAnimatorCompat(view);
f.put(view, viewPropertyAnimatorCompat2);
return viewPropertyAnimatorCompat2;
}
static boolean b(View view, KeyEvent keyEvent) {
if (Build.VERSION.SDK_INT >= 28) {
return false;
}
return UnhandledKeyEventManager.a(view).a(keyEvent);
}
@Deprecated
public static void a(View view, float f2) {
view.setAlpha(f2);
}
public static void a(View view, String str) {
if (Build.VERSION.SDK_INT >= 21) {
view.setTransitionName(str);
return;
}
if (e == null) {
e = new WeakHashMap<>();
}
e.put(view, str);
}
@Deprecated
public static void a(View view, boolean z) {
view.setFitsSystemWindows(z);
}
public static void a(View view, final OnApplyWindowInsetsListener onApplyWindowInsetsListener) {
if (Build.VERSION.SDK_INT >= 21) {
if (onApplyWindowInsetsListener == null) {
view.setOnApplyWindowInsetsListener(null);
} else {
view.setOnApplyWindowInsetsListener(new View.OnApplyWindowInsetsListener() { // from class: androidx.core.view.ViewCompat.1
@Override // android.view.View.OnApplyWindowInsetsListener
public WindowInsets onApplyWindowInsets(View view2, WindowInsets windowInsets) {
return (WindowInsets) WindowInsetsCompat.a(OnApplyWindowInsetsListener.this.a(view2, WindowInsetsCompat.a(windowInsets)));
}
});
}
}
}
public static WindowInsetsCompat a(View view, WindowInsetsCompat windowInsetsCompat) {
if (Build.VERSION.SDK_INT < 21) {
return windowInsetsCompat;
}
WindowInsets windowInsets = (WindowInsets) WindowInsetsCompat.a(windowInsetsCompat);
WindowInsets dispatchApplyWindowInsets = view.dispatchApplyWindowInsets(windowInsets);
if (dispatchApplyWindowInsets != windowInsets) {
windowInsets = new WindowInsets(dispatchApplyWindowInsets);
}
return WindowInsetsCompat.a(windowInsets);
}
public static void a(View view, Drawable drawable) {
if (Build.VERSION.SDK_INT >= 16) {
view.setBackground(drawable);
} else {
view.setBackgroundDrawable(drawable);
}
}
/* JADX WARN: Multi-variable type inference failed */
public static void a(View view, ColorStateList colorStateList) {
if (Build.VERSION.SDK_INT >= 21) {
view.setBackgroundTintList(colorStateList);
if (Build.VERSION.SDK_INT == 21) {
Drawable background = view.getBackground();
boolean z = (view.getBackgroundTintList() == null && view.getBackgroundTintMode() == null) ? false : true;
if (background == null || !z) {
return;
}
if (background.isStateful()) {
background.setState(view.getDrawableState());
}
view.setBackground(background);
return;
}
return;
}
if (view instanceof TintableBackgroundView) {
((TintableBackgroundView) view).setSupportBackgroundTintList(colorStateList);
}
}
/* JADX WARN: Multi-variable type inference failed */
public static void a(View view, PorterDuff.Mode mode) {
if (Build.VERSION.SDK_INT >= 21) {
view.setBackgroundTintMode(mode);
if (Build.VERSION.SDK_INT == 21) {
Drawable background = view.getBackground();
boolean z = (view.getBackgroundTintList() == null && view.getBackgroundTintMode() == null) ? false : true;
if (background == null || !z) {
return;
}
if (background.isStateful()) {
background.setState(view.getDrawableState());
}
view.setBackground(background);
return;
}
return;
}
if (view instanceof TintableBackgroundView) {
((TintableBackgroundView) view).setSupportBackgroundTintMode(mode);
}
}
private static void a(View view, int i2) {
view.offsetLeftAndRight(i2);
if (view.getVisibility() == 0) {
D(view);
Object parent = view.getParent();
if (parent instanceof View) {
D((View) parent);
}
}
}
public static void a(View view, Rect rect) {
if (Build.VERSION.SDK_INT >= 18) {
view.setClipBounds(rect);
}
}
public static void a(View view, int i2, int i3) {
if (Build.VERSION.SDK_INT >= 23) {
view.setScrollIndicators(i2, i3);
}
}
public static void a(View view, PointerIconCompat pointerIconCompat) {
if (Build.VERSION.SDK_INT >= 24) {
view.setPointerIcon((PointerIcon) (pointerIconCompat != null ? pointerIconCompat.a() : null));
}
}
static boolean a(View view, KeyEvent keyEvent) {
if (Build.VERSION.SDK_INT >= 28) {
return false;
}
return UnhandledKeyEventManager.a(view).a(view, keyEvent);
}
}

View File

@@ -0,0 +1,65 @@
package androidx.core.view;
import android.R;
import android.content.Context;
import android.content.res.Resources;
import android.os.Build;
import android.util.Log;
import android.util.TypedValue;
import android.view.ViewConfiguration;
import java.lang.reflect.Method;
/* loaded from: classes.dex */
public final class ViewConfigurationCompat {
private static Method a;
static {
if (Build.VERSION.SDK_INT == 25) {
try {
a = ViewConfiguration.class.getDeclaredMethod("getScaledScrollFactor", new Class[0]);
} catch (Exception unused) {
Log.i("ViewConfigCompat", "Could not find method getScaledScrollFactor() on ViewConfiguration");
}
}
}
private static float a(ViewConfiguration viewConfiguration, Context context) {
Method method;
if (Build.VERSION.SDK_INT >= 25 && (method = a) != null) {
try {
return ((Integer) method.invoke(viewConfiguration, new Object[0])).intValue();
} catch (Exception unused) {
Log.i("ViewConfigCompat", "Could not find method getScaledScrollFactor() on ViewConfiguration");
}
}
TypedValue typedValue = new TypedValue();
if (context.getTheme().resolveAttribute(R.attr.listPreferredItemHeight, typedValue, true)) {
return typedValue.getDimension(context.getResources().getDisplayMetrics());
}
return 0.0f;
}
public static float b(ViewConfiguration viewConfiguration, Context context) {
return Build.VERSION.SDK_INT >= 26 ? viewConfiguration.getScaledHorizontalScrollFactor() : a(viewConfiguration, context);
}
public static float c(ViewConfiguration viewConfiguration, Context context) {
return Build.VERSION.SDK_INT >= 26 ? viewConfiguration.getScaledVerticalScrollFactor() : a(viewConfiguration, context);
}
public static boolean d(ViewConfiguration viewConfiguration, Context context) {
if (Build.VERSION.SDK_INT >= 28) {
return viewConfiguration.shouldShowMenuShortcutsWhenKeyboardPresent();
}
Resources resources = context.getResources();
int identifier = resources.getIdentifier("config_showMenuShortcutsWhenKeyboardPresent", "bool", "android");
return identifier != 0 && resources.getBoolean(identifier);
}
public static int a(ViewConfiguration viewConfiguration) {
if (Build.VERSION.SDK_INT >= 28) {
return viewConfiguration.getScaledHoverSlop();
}
return viewConfiguration.getScaledTouchSlop() / 2;
}
}

View File

@@ -0,0 +1,16 @@
package androidx.core.view;
import android.os.Build;
import android.view.ViewGroup;
import androidx.core.R$id;
/* loaded from: classes.dex */
public final class ViewGroupCompat {
public static boolean a(ViewGroup viewGroup) {
if (Build.VERSION.SDK_INT >= 21) {
return viewGroup.isTransitionGroup();
}
Boolean bool = (Boolean) viewGroup.getTag(R$id.tag_transition_group);
return ((bool == null || !bool.booleanValue()) && viewGroup.getBackground() == null && ViewCompat.p(viewGroup) == null) ? false : true;
}
}

View File

@@ -0,0 +1,144 @@
package androidx.core.view;
import android.os.Build;
import android.util.Log;
import android.view.View;
import android.view.ViewParent;
/* loaded from: classes.dex */
public final class ViewParentCompat {
public static void a(ViewParent viewParent, View view, View view2, int i, int i2) {
if (viewParent instanceof NestedScrollingParent2) {
((NestedScrollingParent2) viewParent).b(view, view2, i, i2);
return;
}
if (i2 == 0) {
if (Build.VERSION.SDK_INT < 21) {
if (viewParent instanceof NestedScrollingParent) {
((NestedScrollingParent) viewParent).onNestedScrollAccepted(view, view2, i);
return;
}
return;
}
try {
viewParent.onNestedScrollAccepted(view, view2, i);
} catch (AbstractMethodError e) {
Log.e("ViewParentCompat", "ViewParent " + viewParent + " does not implement interface method onNestedScrollAccepted", e);
}
}
}
public static boolean b(ViewParent viewParent, View view, View view2, int i, int i2) {
if (viewParent instanceof NestedScrollingParent2) {
return ((NestedScrollingParent2) viewParent).a(view, view2, i, i2);
}
if (i2 != 0) {
return false;
}
if (Build.VERSION.SDK_INT < 21) {
if (viewParent instanceof NestedScrollingParent) {
return ((NestedScrollingParent) viewParent).onStartNestedScroll(view, view2, i);
}
return false;
}
try {
return viewParent.onStartNestedScroll(view, view2, i);
} catch (AbstractMethodError e) {
Log.e("ViewParentCompat", "ViewParent " + viewParent + " does not implement interface method onStartNestedScroll", e);
return false;
}
}
public static void a(ViewParent viewParent, View view, int i) {
if (viewParent instanceof NestedScrollingParent2) {
((NestedScrollingParent2) viewParent).a(view, i);
return;
}
if (i == 0) {
if (Build.VERSION.SDK_INT >= 21) {
try {
viewParent.onStopNestedScroll(view);
return;
} catch (AbstractMethodError e) {
Log.e("ViewParentCompat", "ViewParent " + viewParent + " does not implement interface method onStopNestedScroll", e);
return;
}
}
if (viewParent instanceof NestedScrollingParent) {
((NestedScrollingParent) viewParent).onStopNestedScroll(view);
}
}
}
public static void a(ViewParent viewParent, View view, int i, int i2, int i3, int i4, int i5) {
if (viewParent instanceof NestedScrollingParent2) {
((NestedScrollingParent2) viewParent).a(view, i, i2, i3, i4, i5);
return;
}
if (i5 == 0) {
if (Build.VERSION.SDK_INT >= 21) {
try {
viewParent.onNestedScroll(view, i, i2, i3, i4);
return;
} catch (AbstractMethodError e) {
Log.e("ViewParentCompat", "ViewParent " + viewParent + " does not implement interface method onNestedScroll", e);
return;
}
}
if (viewParent instanceof NestedScrollingParent) {
((NestedScrollingParent) viewParent).onNestedScroll(view, i, i2, i3, i4);
}
}
}
public static void a(ViewParent viewParent, View view, int i, int i2, int[] iArr, int i3) {
if (viewParent instanceof NestedScrollingParent2) {
((NestedScrollingParent2) viewParent).a(view, i, i2, iArr, i3);
return;
}
if (i3 == 0) {
if (Build.VERSION.SDK_INT >= 21) {
try {
viewParent.onNestedPreScroll(view, i, i2, iArr);
return;
} catch (AbstractMethodError e) {
Log.e("ViewParentCompat", "ViewParent " + viewParent + " does not implement interface method onNestedPreScroll", e);
return;
}
}
if (viewParent instanceof NestedScrollingParent) {
((NestedScrollingParent) viewParent).onNestedPreScroll(view, i, i2, iArr);
}
}
}
public static boolean a(ViewParent viewParent, View view, float f, float f2, boolean z) {
if (Build.VERSION.SDK_INT >= 21) {
try {
return viewParent.onNestedFling(view, f, f2, z);
} catch (AbstractMethodError e) {
Log.e("ViewParentCompat", "ViewParent " + viewParent + " does not implement interface method onNestedFling", e);
return false;
}
}
if (viewParent instanceof NestedScrollingParent) {
return ((NestedScrollingParent) viewParent).onNestedFling(view, f, f2, z);
}
return false;
}
public static boolean a(ViewParent viewParent, View view, float f, float f2) {
if (Build.VERSION.SDK_INT >= 21) {
try {
return viewParent.onNestedPreFling(view, f, f2);
} catch (AbstractMethodError e) {
Log.e("ViewParentCompat", "ViewParent " + viewParent + " does not implement interface method onNestedPreFling", e);
return false;
}
}
if (viewParent instanceof NestedScrollingParent) {
return ((NestedScrollingParent) viewParent).onNestedPreFling(view, f, f2);
}
return false;
}
}

View File

@@ -0,0 +1,192 @@
package androidx.core.view;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
import android.os.Build;
import android.view.View;
import android.view.animation.Interpolator;
import java.lang.ref.WeakReference;
/* loaded from: classes.dex */
public final class ViewPropertyAnimatorCompat {
private WeakReference<View> a;
Runnable b = null;
Runnable c = null;
int d = -1;
static class ViewPropertyAnimatorListenerApi14 implements ViewPropertyAnimatorListener {
ViewPropertyAnimatorCompat a;
boolean b;
ViewPropertyAnimatorListenerApi14(ViewPropertyAnimatorCompat viewPropertyAnimatorCompat) {
this.a = viewPropertyAnimatorCompat;
}
@Override // androidx.core.view.ViewPropertyAnimatorListener
public void a(View view) {
Object tag = view.getTag(2113929216);
ViewPropertyAnimatorListener viewPropertyAnimatorListener = tag instanceof ViewPropertyAnimatorListener ? (ViewPropertyAnimatorListener) tag : null;
if (viewPropertyAnimatorListener != null) {
viewPropertyAnimatorListener.a(view);
}
}
@Override // androidx.core.view.ViewPropertyAnimatorListener
public void b(View view) {
int i = this.a.d;
if (i > -1) {
view.setLayerType(i, null);
this.a.d = -1;
}
if (Build.VERSION.SDK_INT >= 16 || !this.b) {
ViewPropertyAnimatorCompat viewPropertyAnimatorCompat = this.a;
Runnable runnable = viewPropertyAnimatorCompat.c;
if (runnable != null) {
viewPropertyAnimatorCompat.c = null;
runnable.run();
}
Object tag = view.getTag(2113929216);
ViewPropertyAnimatorListener viewPropertyAnimatorListener = tag instanceof ViewPropertyAnimatorListener ? (ViewPropertyAnimatorListener) tag : null;
if (viewPropertyAnimatorListener != null) {
viewPropertyAnimatorListener.b(view);
}
this.b = true;
}
}
@Override // androidx.core.view.ViewPropertyAnimatorListener
public void c(View view) {
this.b = false;
if (this.a.d > -1) {
view.setLayerType(2, null);
}
ViewPropertyAnimatorCompat viewPropertyAnimatorCompat = this.a;
Runnable runnable = viewPropertyAnimatorCompat.b;
if (runnable != null) {
viewPropertyAnimatorCompat.b = null;
runnable.run();
}
Object tag = view.getTag(2113929216);
ViewPropertyAnimatorListener viewPropertyAnimatorListener = tag instanceof ViewPropertyAnimatorListener ? (ViewPropertyAnimatorListener) tag : null;
if (viewPropertyAnimatorListener != null) {
viewPropertyAnimatorListener.c(view);
}
}
}
ViewPropertyAnimatorCompat(View view) {
this.a = new WeakReference<>(view);
}
public ViewPropertyAnimatorCompat a(long j) {
View view = this.a.get();
if (view != null) {
view.animate().setDuration(j);
}
return this;
}
public ViewPropertyAnimatorCompat b(float f) {
View view = this.a.get();
if (view != null) {
view.animate().translationY(f);
}
return this;
}
public void c() {
View view = this.a.get();
if (view != null) {
view.animate().start();
}
}
public ViewPropertyAnimatorCompat a(float f) {
View view = this.a.get();
if (view != null) {
view.animate().alpha(f);
}
return this;
}
public long b() {
View view = this.a.get();
if (view != null) {
return view.animate().getDuration();
}
return 0L;
}
public ViewPropertyAnimatorCompat a(Interpolator interpolator) {
View view = this.a.get();
if (view != null) {
view.animate().setInterpolator(interpolator);
}
return this;
}
public ViewPropertyAnimatorCompat b(long j) {
View view = this.a.get();
if (view != null) {
view.animate().setStartDelay(j);
}
return this;
}
public void a() {
View view = this.a.get();
if (view != null) {
view.animate().cancel();
}
}
public ViewPropertyAnimatorCompat a(ViewPropertyAnimatorListener viewPropertyAnimatorListener) {
View view = this.a.get();
if (view != null) {
if (Build.VERSION.SDK_INT >= 16) {
a(view, viewPropertyAnimatorListener);
} else {
view.setTag(2113929216, viewPropertyAnimatorListener);
a(view, new ViewPropertyAnimatorListenerApi14(this));
}
}
return this;
}
private void a(final View view, final ViewPropertyAnimatorListener viewPropertyAnimatorListener) {
if (viewPropertyAnimatorListener != null) {
view.animate().setListener(new AnimatorListenerAdapter(this) { // from class: androidx.core.view.ViewPropertyAnimatorCompat.1
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationCancel(Animator animator) {
viewPropertyAnimatorListener.a(view);
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationEnd(Animator animator) {
viewPropertyAnimatorListener.b(view);
}
@Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
public void onAnimationStart(Animator animator) {
viewPropertyAnimatorListener.c(view);
}
});
} else {
view.animate().setListener(null);
}
}
public ViewPropertyAnimatorCompat a(final ViewPropertyAnimatorUpdateListener viewPropertyAnimatorUpdateListener) {
final View view = this.a.get();
if (view != null && Build.VERSION.SDK_INT >= 19) {
view.animate().setUpdateListener(viewPropertyAnimatorUpdateListener != null ? new ValueAnimator.AnimatorUpdateListener(this) { // from class: androidx.core.view.ViewPropertyAnimatorCompat.2
@Override // android.animation.ValueAnimator.AnimatorUpdateListener
public void onAnimationUpdate(ValueAnimator valueAnimator) {
viewPropertyAnimatorUpdateListener.a(view);
}
} : null);
}
return this;
}
}

View File

@@ -0,0 +1,12 @@
package androidx.core.view;
import android.view.View;
/* loaded from: classes.dex */
public interface ViewPropertyAnimatorListener {
void a(View view);
void b(View view);
void c(View view);
}

View File

@@ -0,0 +1,14 @@
package androidx.core.view;
import android.view.View;
/* loaded from: classes.dex */
public class ViewPropertyAnimatorListenerAdapter implements ViewPropertyAnimatorListener {
@Override // androidx.core.view.ViewPropertyAnimatorListener
public void a(View view) {
}
@Override // androidx.core.view.ViewPropertyAnimatorListener
public void c(View view) {
}
}

View File

@@ -0,0 +1,8 @@
package androidx.core.view;
import android.view.View;
/* loaded from: classes.dex */
public interface ViewPropertyAnimatorUpdateListener {
void a(View view);
}

View File

@@ -0,0 +1,96 @@
package androidx.core.view;
import android.os.Build;
import android.view.WindowInsets;
/* loaded from: classes.dex */
public class WindowInsetsCompat {
private final Object a;
private WindowInsetsCompat(Object obj) {
this.a = obj;
}
public WindowInsetsCompat a() {
if (Build.VERSION.SDK_INT >= 20) {
return new WindowInsetsCompat(((WindowInsets) this.a).consumeSystemWindowInsets());
}
return null;
}
public int b() {
if (Build.VERSION.SDK_INT >= 20) {
return ((WindowInsets) this.a).getSystemWindowInsetBottom();
}
return 0;
}
public int c() {
if (Build.VERSION.SDK_INT >= 20) {
return ((WindowInsets) this.a).getSystemWindowInsetLeft();
}
return 0;
}
public int d() {
if (Build.VERSION.SDK_INT >= 20) {
return ((WindowInsets) this.a).getSystemWindowInsetRight();
}
return 0;
}
public int e() {
if (Build.VERSION.SDK_INT >= 20) {
return ((WindowInsets) this.a).getSystemWindowInsetTop();
}
return 0;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || WindowInsetsCompat.class != obj.getClass()) {
return false;
}
Object obj2 = this.a;
Object obj3 = ((WindowInsetsCompat) obj).a;
return obj2 == null ? obj3 == null : obj2.equals(obj3);
}
public boolean f() {
if (Build.VERSION.SDK_INT >= 21) {
return ((WindowInsets) this.a).isConsumed();
}
return false;
}
public int hashCode() {
Object obj = this.a;
if (obj == null) {
return 0;
}
return obj.hashCode();
}
public WindowInsetsCompat a(int i, int i2, int i3, int i4) {
if (Build.VERSION.SDK_INT >= 20) {
return new WindowInsetsCompat(((WindowInsets) this.a).replaceSystemWindowInsets(i, i2, i3, i4));
}
return null;
}
static WindowInsetsCompat a(Object obj) {
if (obj == null) {
return null;
}
return new WindowInsetsCompat(obj);
}
static Object a(WindowInsetsCompat windowInsetsCompat) {
if (windowInsetsCompat == null) {
return null;
}
return windowInsetsCompat.a;
}
}

View File

@@ -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;
}
}

View File

@@ -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));
}
}

View File

@@ -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);
}
}
}

View File

@@ -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;
}
}

View File

@@ -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);
}
}
}