NetMirror.apk
Download file
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;
/* JADX INFO: renamed from: androidx.core.view.x, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public abstract class AbstractC0276x {
/* JADX INFO: renamed from: a, reason: collision with root package name */
private static boolean f4669a = false;
/* JADX INFO: renamed from: b, reason: collision with root package name */
private static Method f4670b = null;
/* JADX INFO: renamed from: c, reason: collision with root package name */
private static boolean f4671c = false;
/* JADX INFO: renamed from: d, reason: collision with root package name */
private static Field f4672d;
/* JADX INFO: renamed from: androidx.core.view.x$a */
public interface a {
boolean e(KeyEvent keyEvent);
}
private static boolean a(ActionBar actionBar, KeyEvent keyEvent) {
if (!f4669a) {
try {
f4670b = actionBar.getClass().getMethod("onMenuKeyEvent", KeyEvent.class);
} catch (NoSuchMethodException unused) {
}
f4669a = true;
}
Method method = f4670b;
if (method != null) {
try {
Object objInvoke = method.invoke(actionBar, keyEvent);
if (objInvoke == null) {
return false;
}
return ((Boolean) objInvoke).booleanValue();
} catch (IllegalAccessException | InvocationTargetException unused2) {
}
}
return false;
}
private static boolean b(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 (Z.f(decorView, keyEvent)) {
return true;
}
return keyEvent.dispatch(activity, decorView != null ? decorView.getKeyDispatcherState() : null, activity);
}
private static boolean c(Dialog dialog, KeyEvent keyEvent) {
DialogInterface.OnKeyListener onKeyListenerF = f(dialog);
if (onKeyListenerF != null && onKeyListenerF.onKey(dialog, keyEvent.getKeyCode(), keyEvent)) {
return true;
}
Window window = dialog.getWindow();
if (window.superDispatchKeyEvent(keyEvent)) {
return true;
}
View decorView = window.getDecorView();
if (Z.f(decorView, keyEvent)) {
return true;
}
return keyEvent.dispatch(dialog, decorView != null ? decorView.getKeyDispatcherState() : null, dialog);
}
public static boolean d(View view, KeyEvent keyEvent) {
return Z.g(view, keyEvent);
}
public static boolean e(a aVar, View view, Window.Callback callback, KeyEvent keyEvent) {
if (aVar == null) {
return false;
}
return Build.VERSION.SDK_INT >= 28 ? aVar.e(keyEvent) : callback instanceof Activity ? b((Activity) callback, keyEvent) : callback instanceof Dialog ? c((Dialog) callback, keyEvent) : (view != null && Z.f(view, keyEvent)) || aVar.e(keyEvent);
}
private static DialogInterface.OnKeyListener f(Dialog dialog) {
if (!f4671c) {
try {
Field declaredField = Dialog.class.getDeclaredField("mOnKeyListener");
f4672d = declaredField;
declaredField.setAccessible(true);
} catch (NoSuchFieldException unused) {
}
f4671c = true;
}
Field field = f4672d;
if (field == null) {
return null;
}
try {
return (DialogInterface.OnKeyListener) field.get(dialog);
} catch (IllegalAccessException unused2) {
return null;
}
}
}
⚠️ This content was hidden by an advertisement filtering extension in your browser. Please disable it and reload the page to access the decompiled content.
We only display one small text ad to keep this service free. Here's what it looks like:
Read the Docs for Business: You write the docs. We do the rest.
Try it today!Ad by EthicalAds
Download file