正在查看: Tasker v6.5.11 应用的 yd.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Tasker v6.5.11 应用的 yd.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package net.dinglisch.android.taskerm;
import android.accessibilityservice.AccessibilityService;
import android.annotation.TargetApi;
import android.app.AlarmManager;
import android.app.Notification;
import android.app.PendingIntent;
import android.app.WallpaperManager;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGattCallback;
import android.content.ComponentName;
import android.content.ContentProvider;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.UriPermission;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.media.AudioManager;
import android.net.ConnectivityManager;
import android.net.Uri;
import android.net.VpnService;
import android.net.wifi.WifiConfiguration;
import android.net.wifi.WifiInfo;
import android.net.wifi.WifiManager;
import android.os.ParcelFileDescriptor;
import android.os.PowerManager;
import android.os.Process;
import android.provider.Settings;
import android.speech.tts.TextToSpeech;
import android.telephony.SmsMessage;
import android.telephony.TelephonyManager;
import android.view.View;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.ImageView;
import android.widget.Spinner;
import android.widget.TextView;
import com.android.internal.telephony.ITelephony;
import java.io.File;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.List;
public class yd {
private static final HashMap<String, Class<?>> a;
public static class a {
private static boolean a = false;
private static Method b;
public static boolean a() {
b();
return b != null;
}
public static void b() {
if (!a) {
b = yd.r(AccessibilityService.class, "performGlobalAction", new Class[]{Integer.TYPE}, 16);
}
a = true;
}
public static boolean c(AccessibilityService accessibilityService, int i) {
return ((Boolean) yd.u(b, accessibilityService, 0, Integer.valueOf(i))).booleanValue();
}
}
public static class a0 {
private static Method a = null;
private static boolean b = false;
public static File[] a(Context context, String str) {
return (File[]) yd.u(a, context, 11, str);
}
public static boolean b() {
c();
return a != null;
}
public static void c() {
if (b) {
return;
}
a = yd.r(Context.class, "getExternalFilesDirs", new Class[]{String.class}, 19);
b = true;
}
}
public static class a1 {
private static Method a = null;
private static Method b = null;
private static Method c = null;
private static Method d = null;
private static Method e = null;
private static boolean f = false;
public static boolean a() {
d();
return c != null;
}
public static boolean b() {
d();
return (e == null || d == null) ? false : true;
}
public static boolean c() {
d();
return b != null;
}
public static void d() {
if (f) {
return;
}
if (dq.g() >= 18) {
a = yd.q(WebSettings.class, "setAppCacheMaxSize", new Class[]{Integer.TYPE});
b = yd.q(WebSettings.class, "setPluginState", new Class[]{WebSettings.PluginState.class});
if (dq.g() < 19) {
c = yd.q(WebSettings.class, "setDatabasePath", new Class[]{String.class});
}
if (dq.g() >= 16) {
Class cls = Boolean.TYPE;
d = yd.q(WebSettings.class, "setAllowUniversalAccessFromFileURLs", new Class[]{cls});
e = yd.q(WebSettings.class, "setAllowFileAccessFromFileURLs", new Class[]{cls});
}
}
f = true;
}
public static void e(WebSettings webSettings, String str) {
yd.u(c, webSettings, -1, str);
}
public static void f(WebSettings webSettings, boolean z) {
yd.u(e, webSettings, -1, Boolean.valueOf(z));
yd.u(d, webSettings, -1, Boolean.valueOf(z));
}
public static void g(WebSettings webSettings, WebSettings.PluginState pluginState) {
yd.u(b, webSettings, -1, pluginState);
}
}
public static class b {
private static boolean a = false;
private static Class<?> b;
private static Constructor<?> c;
private static Method d;
private static Method e;
public static Object a(long j, PendingIntent pendingIntent) {
try {
return c.newInstance(Long.valueOf(j), pendingIntent);
} catch (Exception e2) {
r7.l("Mirror", "construct " + b.getName(), e2);
return null;
}
}
public static PendingIntent b(Object obj) {
return (PendingIntent) yd.t(e, obj, 9);
}
public static Class<?> c() {
return b;
}
public static long d(Object obj) {
return ((Long) yd.t(d, obj, 7)).longValue();
}
public static boolean e() {
g();
return b != null;
}
public static boolean f() {
return c != null;
}
public static void g() {
if (!a && dq.g() >= 21) {
Class<?> j = yd.j("android.app.AlarmManager$AlarmClockInfo");
b = j;
if (j != null) {
c = yd.l(j, new Class[]{Long.TYPE, PendingIntent.class}, false);
d = yd.o(b, "getTriggerTime");
e = yd.o(b, "getShowIntent");
}
}
a = true;
}
}
public static class b0 {
private static Method a = null;
private static Method b = null;
private static boolean c = false;
private static Class<?> d;
public static Integer a(ContentResolver contentResolver, String str) {
return (Integer) yd.v(a, d, 1, contentResolver, str);
}
public static String b(ContentResolver contentResolver, String str) {
return (String) yd.v(b, d, 2, contentResolver, str);
}
public static boolean c() {
d();
return a != null;
}
public static void d() {
if (c) {
return;
}
if (dq.g() >= 17) {
Class<?> j = yd.j("android.provider.Settings$Global");
d = j;
if (j != null) {
a = yd.q(j, "getInt", new Class[]{ContentResolver.class, String.class});
b = yd.q(d, "getString", new Class[]{ContentResolver.class, String.class});
}
}
c = true;
}
}
public static class b1 {
public static Method a = null;
private static Method b = null;
private static Method c = null;
private static Method d = null;
private static boolean e = false;
public static void a(WebView webView, String str) {
yd.u(b, webView, -1, str);
}
public static void b(WebView webView, String str) {
yd.u(c, webView, -1, str);
}
public static void c(WebView webView) {
yd.s(d, webView);
}
public static boolean d() {
g();
return a != null;
}
public static boolean e() {
g();
return c != null;
}
public static boolean f() {
g();
return d != null;
}
public static void g() {
if (e) {
return;
}
c = yd.q(WebView.class, "findAllAsync", new Class[]{String.class});
b = yd.q(WebView.class, "findAll", new Class[]{String.class});
if (dq.g() < 19) {
d = yd.o(WebView.class, "freeMemory");
}
if (dq.g() >= 19) {
a = yd.q(WebView.class, "setWebContentsDebuggingEnabled", new Class[]{Boolean.TYPE});
}
e = true;
}
public static void h(WebView webView, boolean z) {
yd.u(a, webView, -1, Boolean.valueOf(z));
}
}
public static class c {
private static boolean a = false;
private static Method b;
private static Method c;
private static Method d;
private static Method e;
public static Object a(AlarmManager alarmManager) {
return yd.s(e, alarmManager);
}
public static boolean b() {
e();
return d != null;
}
public static boolean c() {
e();
return c != null;
}
public static boolean d() {
e();
return b != null;
}
public static void e() {
if (a) {
return;
}
if (dq.S1()) {
b = yd.q(AlarmManager.class, "setExactAndAllowWhileIdle", new Class[]{Integer.TYPE, Long.TYPE, PendingIntent.class});
} else if (dq.P1()) {
c = yd.q(AlarmManager.class, "setExact", new Class[]{Integer.TYPE, Long.TYPE, PendingIntent.class});
}
if (b.e() && b.f()) {
d = yd.q(AlarmManager.class, "setAlarmClock", new Class[]{b.c(), PendingIntent.class});
e = yd.o(AlarmManager.class, "getNextAlarmClock");
}
a = true;
}
public static void f(AlarmManager alarmManager, long j, PendingIntent pendingIntent) {
yd.v(d, alarmManager, -1, b.a(j, pendingIntent), pendingIntent);
}
public static void g(AlarmManager alarmManager, int i, long j, PendingIntent pendingIntent) {
yd.w(c, alarmManager, -1, Integer.valueOf(i), Long.valueOf(j), pendingIntent);
}
public static void h(AlarmManager alarmManager, int i, long j, PendingIntent pendingIntent) {
yd.w(b, alarmManager, -1, Integer.valueOf(i), Long.valueOf(j), pendingIntent);
}
}
public static class c0 {
private static boolean a = false;
private static Class<?> b;
private static Method c;
private static Method d;
public static Object a(String str, int i) {
return yd.v(c, b, 11, str, Integer.valueOf(i));
}
public static Class<?> b() {
return b;
}
public static boolean c() {
d();
return b != null;
}
public static void d() {
if (a) {
return;
}
if (dq.S1()) {
Class<?> j = yd.j("android.graphics.drawable.Icon");
b = j;
if (j != null) {
c = yd.q(j, "createWithResource", new Class[]{String.class, Integer.TYPE});
d = yd.q(b, "createWithBitmap", new Class[]{Bitmap.class});
}
}
a = true;
}
}
public static class c1 {
private static Method a = null;
private static boolean b = false;
public static int a(WifiInfo wifiInfo) {
return ((Integer) yd.t(a, wifiInfo, 1)).intValue();
}
public static boolean b() {
c();
return a != null;
}
public static void c() {
if (b) {
return;
}
a = yd.p(WifiInfo.class, "getFrequency", 21);
b = true;
}
}
public static class d {
private static Method a = null;
private static boolean b = false;
public static int a(Object obj, String str, int i, String str2) {
Integer num = (Integer) yd.z(a, obj, -1, str, Integer.valueOf(i), str2);
r7.f("Mirror", "appOps: checkOp: " + str + ": uid " + i + " pkg " + str2 + " got " + num);
if (num == null) {
return 2;
}
return num.intValue();
}
public static Object b(Context context) {
return context.getSystemService("appops");
}
public static boolean c(Context context) {
d();
boolean z = (a == null || b(context) == null) ? false : true;
r7.f("Mirror", "appOps: have: " + z);
return z;
}
public static void d() {
if (b) {
return;
}
if (dq.g() >= 19) {
Class<?> j = yd.j("android.app.AppOpsManager");
StringBuilder sb = new StringBuilder();
sb.append("appOps: haveClass: ");
sb.append(j != null);
r7.f("Mirror", sb.toString());
if (j != null) {
a = yd.q(j, "checkOp", new Class[]{String.class, Integer.TYPE, String.class});
StringBuilder sb2 = new StringBuilder();
sb2.append("appOps: haveCheckOp: ");
sb2.append(a != null);
r7.f("Mirror", sb2.toString());
}
}
b = true;
}
}
public static class d0 {
private static Method a = null;
private static Method b = null;
private static boolean c = false;
private static boolean a() {
b();
return a != null;
}
public static void b() {
if (c) {
return;
}
Class cls = Integer.TYPE;
a = yd.q(ImageView.class, "setImageAlpha", new Class[]{cls});
b = yd.q(ImageView.class, "setAlpha", new Class[]{cls});
c = true;
}
public static void c(ImageView imageView, int i) {
if (a()) {
yd.u(a, imageView, -1, Integer.valueOf(i));
} else {
yd.u(b, imageView, -1, Integer.valueOf(i));
}
}
}
public static class d1 {
private static Method a = null;
private static Method b = null;
private static Method c = null;
private static boolean d = false;
public static int a(WifiManager wifiManager) {
d();
int intValue = ((Integer) yd.t(b, wifiManager, 1)).intValue();
switch (intValue) {
case 10:
return 0;
case 11:
return 1;
case 12:
return 2;
case 13:
return 3;
case 14:
return 4;
default:
return intValue;
}
}
public static boolean b() {
d();
return c != null;
}
public static boolean c() {
d();
return b != null && (com.joaomgcd.taskerm.util.k.s() || a != null);
}
public static void d() {
if (d) {
return;
}
b = yd.o(WifiManager.class, "getWifiApState");
a = yd.q(WifiManager.class, "setWifiApEnabled", new Class[]{WifiConfiguration.class, Boolean.TYPE});
if (dq.g() >= 18) {
c = yd.o(WifiManager.class, "isScanAlwaysAvailable");
}
d = true;
}
public static boolean e(WifiManager wifiManager) {
return ((Boolean) yd.t(c, wifiManager, 0)).booleanValue();
}
public static boolean f(WifiManager wifiManager, boolean z) {
d();
return ((Boolean) yd.v(a, wifiManager, 0, null, Boolean.valueOf(z))).booleanValue();
}
}
public static class e {
private static Method a = null;
private static Method b = null;
private static Method c = null;
private static Method d = null;
private static boolean e = false;
public static int a(AudioManager audioManager, int i) {
return ((Integer) yd.u(a, audioManager, 1, Integer.valueOf(i))).intValue();
}
public static boolean b() {
d();
return a != null;
}
public static boolean c() {
d();
return b != null;
}
public static void d() {
if (e) {
return;
}
Class cls = Integer.TYPE;
a = yd.q(AudioManager.class, "getVibrateSetting", new Class[]{cls});
b = yd.q(AudioManager.class, "setVibrateSetting", new Class[]{cls, cls});
c = yd.q(AudioManager.class, "registerMediaButtonEventReceiver", new Class[]{ComponentName.class});
d = yd.q(AudioManager.class, "unregisterMediaButtonEventReceiver", new Class[]{ComponentName.class});
e = true;
}
public static void e(AudioManager audioManager, ComponentName componentName) {
d();
yd.u(c, audioManager, -1, componentName);
}
public static void f(AudioManager audioManager, int i, int i2) {
yd.v(a, audioManager, -1, Integer.valueOf(i), Integer.valueOf(i2));
}
public static void g(AudioManager audioManager, ComponentName componentName) {
d();
yd.u(d, audioManager, -1, componentName);
}
}
public static class e0 {
private static Method a = null;
private static boolean b = false;
public static boolean a() {
b();
return a != null;
}
public static void b() {
if (b) {
return;
}
a = yd.q(PendingIntent.class, "normalizeMimeType", new Class[]{String.class});
b = true;
}
public static String c(String str) {
return (String) yd.u(a, Intent.class, 2, str);
}
}
public static class e1 {
private static Object a = null;
private static Method b = null;
private static Method c = null;
private static boolean d = false;
public static int a(Context context) {
c(context);
Integer num = 99;
try {
Object t = yd.t(b, a, 1);
if (t.getClass().getName().equals("android.net.wimax.WimaxState")) {
r7.G("Mirror", "got unknown enumeration for wimax state");
} else {
Integer num2 = (Integer) t;
try {
r7.f("Mirror", "getWimaxState: " + num2);
num = num2;
} catch (ClassCastException e) {
e = e;
num = num2;
r7.H("Mirror", "getWimaxState: ", e);
return num.intValue();
}
}
} catch (ClassCastException e2) {
e = e2;
}
return num.intValue();
}
public static boolean b(Context context) {
c(context);
return a != null;
}
public static void c(Context context) {
if (d) {
return;
}
try {
a = oi.d(context, "wimax", "Mirror", "init/wmax");
} catch (Exception unused) {
}
if (a == null) {
r7.f("Mirror", "wimax manager (old): unavailable");
try {
a = oi.d(context, "WiMax", "Mirror", "init/wmaxold");
} catch (Exception e) {
r7.g("Mirror", "WimaxManager (new)", e);
}
if (a == null) {
r7.f("Mirror", "wimax manager (new): unavailable");
}
}
Object obj = a;
if (obj != null) {
b = yd.o(obj.getClass(), "getWimaxState");
c = yd.q(a.getClass(), "setWimaxEnabled", new Class[]{Boolean.TYPE});
}
d = true;
}
public static void d(Context context, boolean z) {
c(context);
try {
c.invoke(a, Boolean.valueOf(z));
} catch (Exception e) {
yd.A(c, e);
}
}
}
public static class f {
private static Method a = null;
private static Method b = null;
private static Method c = null;
private static boolean d = false;
public static BluetoothAdapter a() {
return (BluetoothAdapter) yd.s(a, BluetoothAdapter.class);
}
public static boolean b() {
d();
return a != null;
}
public static boolean c() {
d();
return (b == null || c == null) ? false : true;
}
public static void d() {
if (d) {
return;
}
a = yd.o(BluetoothAdapter.class, "getDefaultAdapter");
if (dq.g() >= 18) {
Class<?> j = yd.j("android.bluetooth.BluetoothAdapter$LeScanCallback");
b = yd.q(BluetoothAdapter.class, "startLeScan", new Class[]{j});
c = yd.q(BluetoothAdapter.class, "stopLeScan", new Class[]{j});
}
d = true;
}
public static boolean e(BluetoothAdapter bluetoothAdapter, Object obj) {
return ((Boolean) yd.u(b, bluetoothAdapter, 0, obj)).booleanValue();
}
public static void f(BluetoothAdapter bluetoothAdapter, Object obj) {
yd.u(c, bluetoothAdapter, -1, obj);
}
}
public static class f0 {
private static Method a = null;
private static Method b = null;
private static Method c = null;
private static Method d = null;
private static Method e = null;
private static Method f = null;
private static boolean g = false;
public static void a(Notification.Builder builder, int i, CharSequence charSequence, PendingIntent pendingIntent) {
yd.w(a, builder, -1, Integer.valueOf(i), charSequence, pendingIntent);
}
public static Notification b(Notification.Builder builder) {
return (Notification) yd.s(b, builder);
}
public static boolean c() {
j();
return e != null;
}
public static boolean d() {
j();
return d != null;
}
public static boolean e() {
j();
return f != null;
}
public static Notification f(Notification.Builder builder) {
return i() ? b(builder) : g(builder);
}
public static Notification g(Notification.Builder builder) {
return (Notification) yd.s(c, builder);
}
public static boolean h() {
j();
return a != null;
}
public static boolean i() {
j();
return b != null;
}
private static void j() {
if (g) {
return;
}
if (c0.c()) {
f = yd.q(Notification.Builder.class, "setSmallIcon", new Class[]{c0.b()});
}
b = yd.o(Notification.Builder.class, "build");
Class cls = Integer.TYPE;
d = yd.q(Notification.Builder.class, "setPriority", new Class[]{cls});
e = yd.r(Notification.Builder.class, "setCategory", new Class[]{String.class}, 21);
c = yd.o(Notification.Builder.class, "getNotification");
a = yd.q(Notification.Builder.class, "addAction", new Class[]{cls, CharSequence.class, PendingIntent.class});
g = true;
}
public static Notification.Builder k(Notification.Builder builder, String str) {
return (Notification.Builder) yd.u(e, builder, -1, str);
}
public static Notification.Builder l(Notification.Builder builder, int i) {
return (Notification.Builder) yd.u(d, builder, -1, Integer.valueOf(i));
}
public static void m(Notification.Builder builder, Object obj) {
yd.u(f, builder, -1, obj);
}
}
public static class g {
public static Object a(BluetoothDevice bluetoothDevice, Context context, boolean z, Object obj) {
return bluetoothDevice.connectGatt(context, z, (BluetoothGattCallback) obj);
}
public static int b(BluetoothDevice bluetoothDevice) {
return bluetoothDevice.getType();
}
public static boolean c() {
return true;
}
public static boolean d() {
return true;
}
}
public static class g0 {
private static boolean a = false;
private static Method b;
private static Method c;
private static Method d;
public static int a(Object obj) {
c();
return ((Integer) yd.s(b, obj)).intValue();
}
public static boolean b() {
c();
return b != null;
}
public static void c() {
if (a) {
return;
}
if (dq.P1()) {
Class<?> j = yd.j("android.service.notification.NotificationListenerService");
if (j != null) {
b = yd.o(j, "getCurrentInterruptionFilter");
c = yd.q(j, "requestInterruptionFilter", new Class[]{Integer.TYPE});
StringBuilder sb = new StringBuilder();
sb.append("appOps: haveGetCurrentFilter: ");
sb.append(b != null);
r7.f("Mirror", sb.toString());
}
if (dq.T1()) {
d = yd.q(j, "requestRebind", new Class[]{ComponentName.class});
}
}
a = true;
}
public static void d(Object obj, int i) {
c();
yd.u(c, obj, -1, Integer.valueOf(i));
}
public static void e(Object obj, ComponentName componentName) {
c();
yd.u(d, obj, -1, componentName);
}
}
public static class h {
private static boolean a = false;
private static Method b;
private static Method c;
private static Method d;
private static Method e;
private static Method f;
public static void a(Object obj) {
d();
yd.s(b, obj);
}
public static boolean b(Object obj) {
d();
return ((Boolean) yd.s(d, obj)).booleanValue();
}
public static Class<?> c() {
return yd.j("android.bluetooth.BluetoothGatt");
}
public static void d() {
if (a) {
return;
}
b = yd.p(c(), "close", 18);
c = yd.p(c(), "disconnect", 18);
d = yd.p(c(), "connect", 18);
e = yd.o(c(), "readRemoteRssi");
f = yd.o(c(), "discoverServices");
a = true;
}
}
public static class h0 {
private static Method a = null;
private static Method b = null;
private static boolean c = false;
public static String a(PendingIntent pendingIntent) {
return (String) yd.t(b, pendingIntent, 2);
}
public static String b(PendingIntent pendingIntent) {
return (String) yd.t(a, pendingIntent, 2);
}
public static boolean c() {
d();
return a != null;
}
public static void d() {
if (c) {
return;
}
a = yd.o(PendingIntent.class, "getTargetPackage");
b = yd.o(PendingIntent.class, "getCreatorPackage");
c = true;
}
}
public static class i {
private static Method a = null;
private static Method b = null;
private static boolean c = false;
private static Class<?> d;
public static BluetoothAdapter a(Object obj) {
return (BluetoothAdapter) yd.s(a, obj);
}
public static Object b(Context context) {
return oi.d(context, "bluetooth", "Mirror", "getManager/bt");
}
public static boolean c() {
d();
return a != null;
}
public static void d() {
if (c) {
return;
}
Class<?> j = yd.j("android.bluetooth.BluetoothManager");
d = j;
if (j != null) {
a = yd.o(j, "getAdapter");
b = yd.q(d, "getConnectionState", new Class[]{BluetoothDevice.class, Integer.TYPE});
}
c = true;
}
}
public static class i0 {
private static Method a = null;
private static Method b = null;
private static Method c = null;
private static boolean d = false;
public static boolean a() {
e();
return b != null;
}
public static boolean b() {
e();
return a != null;
}
public static PowerManager c(Context context) {
return (PowerManager) context.getApplicationContext().getSystemService("power");
}
public static boolean d() {
e();
return b != null;
}
public static void e() {
if (d) {
return;
}
a = yd.p(PowerManager.class, "isPowerSaveMode", 21);
if (dq.S1()) {
b = yd.o(PowerManager.class, "isDeviceIdleMode");
c = yd.q(PowerManager.class, "isIgnoringBatteryOptimizations", new Class[]{String.class});
}
d = true;
}
public static boolean f(PowerManager powerManager) {
return ((Boolean) yd.t(b, powerManager, 0)).booleanValue();
}
public static boolean g(PowerManager powerManager, String str) {
return ((Boolean) yd.u(c, powerManager, 0, str)).booleanValue();
}
public static boolean h(PowerManager powerManager) {
return ((Boolean) yd.t(a, powerManager, 0)).booleanValue();
}
}
public static class j {
private static boolean a = false;
private static Class<?> b;
private static Method c;
private static Method d;
public static String[] a(Object obj) {
return (String[]) yd.s(d, obj);
}
public static Object b(Context context) {
return oi.d(context, "camera", "Mirror", "getService");
}
public static boolean c() {
e();
return b != null;
}
public static boolean d() {
e();
return c != null;
}
public static void e() {
if (a) {
return;
}
if (dq.g() >= 21) {
Class<?> j = yd.j("android.hardware.camera2.CameraManager");
b = j;
if (j != null) {
c = yd.q(j, "setTorchMode", new Class[]{String.class, Boolean.TYPE});
d = yd.o(b, "getCameraIdList");
}
}
a = true;
}
}
public static class j0 {
private static boolean a = false;
private static Method b;
public static boolean a() {
b();
return b != null;
}
public static void b() {
if (a) {
return;
}
if (dq.g() >= 17) {
b = yd.o(Process.class, "myUserHandle");
}
a = true;
}
public static Object c() {
return yd.s(b, Process.class);
}
}
public static class k {
private static Method a = null;
private static boolean b = false;
public static int a(Object obj) {
b();
return ((Integer) yd.s(a, obj)).intValue();
}
public static void b() {
if (b) {
return;
}
a = yd.o(yd.j("android.telephony.CellIdentityCdma"), "getBasestationId");
b = true;
}
}
public static class k0 {
private static Method a = null;
private static Method b = null;
private static Method c = null;
private static Method d = null;
private static boolean e = false;
private static int a(Resources resources, int i, boolean z) {
return ((Integer) yd.y(d, resources, 1, z, new Object[]{Integer.valueOf(i)})).intValue();
}
private static int b(Resources resources, int i, Resources.Theme theme, boolean z) {
return ((Integer) yd.y(c, resources, 1, z, new Object[]{Integer.valueOf(i), theme})).intValue();
}
public static int c(Resources resources, int i, Resources.Theme theme) {
return d(resources, i, theme, true);
}
public static int d(Resources resources, int i, Resources.Theme theme, boolean z) {
return h() ? a(resources, i, z) : b(resources, i, theme, z);
}
private static Drawable e(Resources resources, int i) {
return (Drawable) yd.u(b, resources, 3, Integer.valueOf(i));
}
private static Drawable f(Resources resources, int i, Resources.Theme theme) {
return (Drawable) yd.v(a, resources, 3, Integer.valueOf(i), theme);
}
public static Drawable g(Resources resources, int i, Resources.Theme theme) {
return i() ? e(resources, i) : f(resources, i, theme);
}
private static boolean h() {
j();
return d != null;
}
private static boolean i() {
j();
return b != null;
}
public static void j() {
if (e) {
return;
}
if (dq.g() >= 23) {
c = yd.q(Resources.class, "getColor", new Class[]{Integer.TYPE, Resources.Theme.class});
} else {
d = yd.q(Resources.class, "getColor", new Class[]{Integer.TYPE});
}
if (dq.g() >= 22) {
a = yd.q(Resources.class, "getDrawable", new Class[]{Integer.TYPE, Resources.Theme.class});
} else {
b = yd.q(Resources.class, "getDrawable", new Class[]{Integer.TYPE});
}
e = true;
}
}
public static class l {
private static Method a = null;
private static Method b = null;
private static Method c = null;
private static boolean d = false;
public static int a(Object obj) {
d();
return ((Integer) yd.s(b, obj)).intValue();
}
public static int b(Object obj) {
d();
return ((Integer) yd.s(a, obj)).intValue();
}
public static int c(Object obj) {
d();
return ((Integer) yd.s(c, obj)).intValue();
}
public static void d() {
if (d) {
return;
}
Class<?> j = yd.j("android.telephony.CellIdentityGsm");
a = yd.o(j, "getLac");
b = yd.o(j, "getCid");
c = yd.o(j, "getPsc");
d = true;
}
}
public static class l0 {
private static Method a = null;
private static boolean b = false;
public static boolean a() {
c();
return a != null;
}
@TargetApi(23)
public static boolean b(Context context) {
boolean canDrawOverlays;
if (!com.joaomgcd.taskerm.util.k.f() && !com.joaomgcd.taskerm.util.p.j(context)) {
canDrawOverlays = android.provider.Settings.canDrawOverlays(context);
if (!canDrawOverlays) {
return false;
}
}
return true;
}
public static void c() {
if (b) {
return;
}
a = yd.r(android.provider.Settings.class, "canDrawOverlays", new Class[]{Context.class}, 23);
b = true;
}
}
public static class m {
private static Method a = null;
private static Method b = null;
private static Method c = null;
private static Method d = null;
private static Method e = null;
private static boolean f = false;
public static int a(Object obj) {
f();
return ((Integer) yd.s(c, obj)).intValue();
}
public static int b(Object obj) {
f();
return ((Integer) yd.s(a, obj)).intValue();
}
public static int c(Object obj) {
f();
return ((Integer) yd.s(b, obj)).intValue();
}
public static int d(Object obj) {
f();
return ((Integer) yd.s(d, obj)).intValue();
}
public static int e(Object obj) {
f();
return ((Integer) yd.s(e, obj)).intValue();
}
public static void f() {
if (f) {
return;
}
Class<?> j = yd.j("android.telephony.CellIdentityLte");
a = yd.o(j, "getMcc");
b = yd.o(j, "getMnc");
c = yd.o(j, "getCi");
d = yd.o(j, "getPci");
e = yd.o(j, "getTac");
f = true;
}
}
public static class m0 {
private static Method a = null;
private static Method b = null;
private static boolean c = false;
public static boolean a() {
c();
return a != null;
}
public static boolean b() {
c();
return b != null;
}
public static void c() {
if (c) {
return;
}
a = yd.q(Spinner.class, "setDropDownWidth", new Class[]{Integer.TYPE});
b = yd.q(Spinner.class, "setPopupBackgroundDrawable", new Class[]{Drawable.class});
c = true;
}
public static void d(Spinner spinner, int i) {
yd.u(a, spinner, -1, Integer.valueOf(i));
}
public static void e(Spinner spinner, Drawable drawable) {
yd.u(b, spinner, -1, drawable);
}
}
public static class n {
private static Method a = null;
private static Method b = null;
private static Method c = null;
private static boolean d = false;
public static int a(Object obj) {
d();
return ((Integer) yd.s(b, obj)).intValue();
}
public static int b(Object obj) {
d();
return ((Integer) yd.s(a, obj)).intValue();
}
public static int c(Object obj) {
d();
return ((Integer) yd.s(c, obj)).intValue();
}
public static void d() {
if (d) {
return;
}
Class<?> j = yd.j("android.telephony.CellIdentityWcdma");
a = yd.o(j, "getLac");
b = yd.o(j, "getCid");
c = yd.o(j, "getPsc");
d = true;
}
}
public static class n0 {
private static Method a = null;
private static Method b = null;
private static Method c = null;
private static Method d = null;
private static boolean e = false;
public static boolean a(Context context) {
if (com.joaomgcd.taskerm.util.k.v()) {
return true;
}
f(context);
return d() || e();
}
private static Object b(Context context) {
return oi.d(context, "statusbar", "Mirror", "getService/m");
}
private static boolean c() {
return c != null;
}
private static boolean d() {
return (a == null || b == null) ? false : true;
}
private static boolean e() {
return c() && d != null;
}
public static void f(Context context) {
if (e) {
return;
}
Object b2 = b(context);
if (b2 != null) {
a = yd.o(b2.getClass(), "expand");
b = yd.o(b2.getClass(), "collapse");
if (!d()) {
c = yd.o(b2.getClass(), "expandNotificationsPanel");
d = yd.o(b2.getClass(), "collapsePanels");
}
}
e = true;
}
public static boolean g(Context context, boolean z) {
Method method;
f(context);
Object b2 = b(context);
try {
if (d()) {
method = z ? a : b;
} else if (c() && z) {
method = c;
} else if (e()) {
method = z ? c : d;
} else {
r7.G("Mirror", "no sbs method available");
method = null;
}
if (method != null) {
method.invoke(b2, null);
return true;
}
r7.G("Mirror", "set status bar: no way to set");
return false;
} catch (Exception e2) {
r7.H("Mirror", "set status bar", e2);
return false;
}
}
}
public static class o {
private static Method a = null;
private static boolean b = false;
private static Class<?> c;
public static boolean a() {
b();
return c != null;
}
public static void b() {
if (b) {
return;
}
if (dq.g() >= 17) {
Class<?> j = yd.j("android.telephony.CellInfo");
c = j;
a = yd.o(j, "isRegistered");
}
b = true;
}
public static boolean c(Object obj) {
return ((Boolean) yd.s(a, obj)).booleanValue();
}
}
public static class o0 {
public static boolean a() {
return !com.joaomgcd.taskerm.util.k.f();
}
@TargetApi(23)
public static boolean b(Context context) {
boolean canWrite;
if (com.joaomgcd.taskerm.util.k.f()) {
return true;
}
canWrite = Settings.System.canWrite(context);
return canWrite;
}
}
public static class p {
private static Method a = null;
private static Method b = null;
private static boolean c = false;
private static Class<?> d;
public static Object a(Object obj) {
e();
return yd.s(a, obj);
}
public static Object b(Object obj) {
e();
return yd.s(b, obj);
}
public static Class<?> c() {
e();
return d;
}
public static String d() {
return "android.telephony.CellInfoCdma";
}
public static void e() {
if (c) {
return;
}
Class<?> j = yd.j(d());
d = j;
b = yd.o(j, "getCellSignalStrength");
a = yd.o(d, "getCellIdentity");
c = true;
}
}
public static class p0 {
private static Method a = null;
private static Method b = null;
private static Method c = null;
private static boolean d = false;
public static int a() {
return ((Integer) yd.s(c, TextToSpeech.class)).intValue();
}
public static boolean b() {
e();
return b != null;
}
public static boolean c() {
e();
return c != null;
}
public static boolean d() {
e();
return a != null;
}
public static void e() {
if (d) {
return;
}
c = yd.p(TextToSpeech.class, "getMaxSpeechInputLength", 18);
Class<?> j = yd.j("android.speech.tts.UtteranceProgressListener");
if (j != null) {
a = yd.q(TextToSpeech.class, "setOnUtteranceProgressListener", new Class[]{j});
}
Class<?> j2 = yd.j("android.speech.tts.TextToSpeech$OnUtteranceCompletedListener");
if (j2 != null) {
b = yd.q(TextToSpeech.class, "setOnUtteranceCompletedListener", new Class[]{j2});
}
d = true;
}
public static int f(TextToSpeech textToSpeech, Object obj) {
return ((Integer) yd.u(b, textToSpeech, 1, obj)).intValue();
}
public static void g(TextToSpeech textToSpeech, Object obj) {
yd.u(a, textToSpeech, -1, obj);
}
}
public static class q {
private static Method a = null;
private static Method b = null;
private static boolean c = false;
private static Class<?> d;
public static Object a(Object obj) {
e();
return yd.s(a, obj);
}
public static Object b(Object obj) {
e();
return yd.s(b, obj);
}
public static Class<?> c() {
e();
return d;
}
public static String d() {
return "android.telephony.CellInfoGsm";
}
public static void e() {
if (c) {
return;
}
Class<?> j = yd.j(d());
d = j;
b = yd.o(j, "getCellSignalStrength");
a = yd.o(d, "getCellIdentity");
c = true;
}
}
public static class q0 {
private static Method a = null;
private static Method b = null;
private static boolean c = false;
public static List<Object> a(TelephonyManager telephonyManager) {
return (List) yd.s(b, telephonyManager);
}
public static ITelephony b(TelephonyManager telephonyManager) {
e();
return (ITelephony) yd.s(a, telephonyManager);
}
public static boolean c() {
e();
return b != null;
}
public static boolean d() {
e();
return a != null;
}
public static void e() {
if (c) {
return;
}
a = com.joaomgcd.taskerm.util.o8.p(TelephonyManager.class, "getITelephony", com.joaomgcd.taskerm.util.k.t());
if (dq.g() >= 17) {
b = com.joaomgcd.taskerm.util.o8.p(TelephonyManager.class, "getAllCellInfo", com.joaomgcd.taskerm.util.k.t());
}
c = true;
}
}
public static class r {
private static Method a = null;
private static Method b = null;
private static boolean c = false;
private static Class<?> d;
public static Object a(Object obj) {
e();
return yd.s(a, obj);
}
public static Object b(Object obj) {
e();
return yd.s(b, obj);
}
public static Class<?> c() {
e();
return d;
}
public static String d() {
return "android.telephony.CellInfoLte";
}
public static void e() {
if (c) {
return;
}
Class<?> j = yd.j(d());
d = j;
b = yd.o(j, "getCellSignalStrength");
a = yd.o(d, "getCellIdentity");
c = true;
}
}
public static class r0 {
private static Method a = null;
private static boolean b = false;
private static Class<?> c;
public static String a(Context context) {
return (String) yd.u(a, c, 2, context);
}
public static boolean b() {
c();
return a != null;
}
public static void c() {
if (b) {
return;
}
if (dq.g() >= 19) {
Class<?> j = yd.j("android.provider.Telephony$Sms");
c = j;
if (j != null) {
a = yd.q(j, "getDefaultSmsPackage", new Class[]{Context.class});
}
}
b = true;
}
}
public static class s {
private static Method a = null;
private static Method b = null;
private static boolean c = false;
private static Class<?> d;
public static Object a(Object obj) {
e();
return yd.s(a, obj);
}
public static Object b(Object obj) {
e();
return yd.s(b, obj);
}
public static Class<?> c() {
e();
return d;
}
public static String d() {
return "android.telephony.CellInfoWcdma";
}
public static void e() {
if (c) {
return;
}
Class<?> j = yd.j(d());
d = j;
b = yd.o(j, "getCellSignalStrength");
a = yd.o(d, "getCellIdentity");
c = true;
}
}
public static class s0 {
private static Method a = null;
private static boolean b = false;
private static Class<?> c;
public static SmsMessage[] a(Intent intent) {
return (SmsMessage[]) yd.u(a, c, 8, intent);
}
public static boolean b() {
c();
return a != null;
}
public static void c() {
if (b) {
return;
}
if (dq.g() >= 19) {
Class<?> j = yd.j("android.provider.Telephony$Sms$Intents");
c = j;
if (j != null) {
a = yd.q(j, "getMessagesFromIntent", new Class[]{Intent.class});
}
}
b = true;
}
}
public static class t {
private static Method a = null;
private static Method b = null;
private static boolean c = false;
public static int a(Object obj) {
c();
return ((Integer) yd.s(a, obj)).intValue();
}
public static int b(Object obj) {
c();
return ((Integer) yd.s(b, obj)).intValue();
}
public static void c() {
if (c) {
return;
}
Class<?> j = yd.j("android.telephony.CellSignalStrengthCdma");
b = yd.o(j, "getCdmaEcio");
a = yd.o(j, "getCdmaDbm");
c = true;
}
}
public static class t0 {
private static Method a = null;
private static boolean b = false;
public static void a() {
if (b) {
return;
}
if (dq.g() < 23) {
a = yd.q(TextView.class, "setTextAppearance", new Class[]{Context.class, Integer.TYPE});
} else {
a = yd.q(TextView.class, "setTextAppearance", new Class[]{Integer.TYPE});
}
b = true;
}
private static void b(TextView textView, int i) {
yd.u(a, textView, -1, Integer.valueOf(i));
}
public static void c(TextView textView, Context context, int i) {
a();
if (dq.g() < 23) {
d(textView, context, i);
} else {
b(textView, i);
}
}
private static void d(TextView textView, Context context, int i) {
yd.v(a, textView, -1, context, Integer.valueOf(i));
}
}
public static class u {
private static Method a = null;
private static boolean b = false;
public static int a(Object obj) {
b();
return ((Integer) yd.s(a, obj)).intValue();
}
public static void b() {
if (b) {
return;
}
a = yd.o(yd.j("android.telephony.CellSignalStrengthGsm"), "getAsuLevel");
b = true;
}
}
public static class u0 {
public static Uri a(UriPermission uriPermission) {
return uriPermission.getUri();
}
public static boolean b(UriPermission uriPermission) {
return uriPermission.isReadPermission();
}
public static boolean c(UriPermission uriPermission) {
return uriPermission.isWritePermission();
}
}
public static class v {
private static Method a = null;
private static boolean b = false;
public static int a(Object obj) {
b();
return ((Integer) yd.s(a, obj)).intValue();
}
public static void b() {
if (b) {
return;
}
a = yd.o(yd.j("android.telephony.CellSignalStrengthLte"), "getLevel");
b = true;
}
}
public static class v0 {
private static boolean a = false;
private static Class<?> b;
public static Class<?> a() {
c();
return b;
}
public static boolean b() {
c();
return b != null;
}
public static void c() {
if (a) {
return;
}
if (dq.g() >= 17) {
b = yd.j("android.os.UserHandle");
}
a = true;
}
}
public static class w {
private static Method a = null;
private static boolean b = false;
public static int a(Object obj) {
b();
return ((Integer) yd.s(a, obj)).intValue();
}
public static void b() {
if (b) {
return;
}
a = yd.o(yd.j("android.telephony.CellSignalStrengthWcdma"), "getAsuLevel");
b = true;
}
}
public static class w0 {
private static boolean a = false;
private static Method b;
private static Class<?> c;
public static Object a(Context context) {
return oi.d(context, "user", "Mirror", "getManager/um");
}
public static long b(Object obj, Object obj2) {
d();
return ((Long) yd.u(b, obj, 7, obj2)).longValue();
}
public static boolean c() {
d();
return b != null;
}
public static void d() {
if (a) {
return;
}
if (dq.g() >= 17) {
Class<?> j = yd.j("android.os.UserManager");
c = j;
if (j != null && v0.b()) {
b = yd.q(c, "getSerialNumberForUser", new Class[]{v0.a()});
}
}
a = true;
}
}
public static class x {
private static boolean a = false;
private static Method b;
private static Method c;
private static Method d;
private static Method e;
private static Method f;
private static Method g;
private static Method h;
private static Method i;
private static Method j;
private static Method k;
public static boolean a(Context context) {
m();
return dq.g() < 16 && n(context) && !dq.r(h(context));
}
public static boolean b(Context context) {
m();
return d1.c() && (dq.T1() || (n(context) && !dq.r(i(context))));
}
public static boolean c() {
m();
return (j == null || k == null) ? false : true;
}
public static String d(Context context) {
m();
String[] strArr = (String[]) yd.s(h, e(context));
if (dq.r(strArr)) {
return null;
}
return strArr[0];
}
private static ConnectivityManager e(Context context) {
return (ConnectivityManager) oi.d(context, "connectivity", "Mirror", "getManager/con");
}
public static boolean f(ConnectivityManager connectivityManager) {
m();
return ((Boolean) yd.t(j, connectivityManager, 0)).booleanValue();
}
public static String[] g(Context context) {
m();
return (String[]) yd.s(c, e(context));
}
public static String[] h(Context context) {
m();
return (String[]) yd.s(h, e(context));
}
public static String[] i(Context context) {
m();
return (String[]) yd.s(i, e(context));
}
public static String[] j(Context context) {
m();
return (String[]) yd.s(d, e(context));
}
public static boolean k() {
m();
return j != null;
}
public static boolean l() {
m();
return b != null;
}
public static void m() {
if (a) {
return;
}
g = yd.o(ConnectivityManager.class, "isTetheringSupported");
e = yd.q(ConnectivityManager.class, "tether", new Class[]{String.class});
f = yd.q(ConnectivityManager.class, "untether", new Class[]{String.class});
c = yd.o(ConnectivityManager.class, "getTetherableIfaces");
d = yd.o(ConnectivityManager.class, "getTetheredIfaces");
i = yd.o(ConnectivityManager.class, "getTetherableWifiRegexs");
h = yd.o(ConnectivityManager.class, "getTetherableUsbRegexs");
j = yd.o(ConnectivityManager.class, "getMobileDataEnabled");
Class cls = Boolean.TYPE;
k = yd.q(ConnectivityManager.class, "setMobileDataEnabled", new Class[]{cls});
b = yd.q(ConnectivityManager.class, "setRadio", new Class[]{Integer.TYPE, cls});
a = true;
}
public static boolean n(Context context) {
Method method;
m();
ConnectivityManager e2 = e(context);
if (e2 == null || (method = g) == null) {
return false;
}
return ((Boolean) yd.t(method, e2, 0)).booleanValue();
}
public static boolean o(ConnectivityManager connectivityManager, int i2, boolean z) {
return ((Boolean) yd.v(b, connectivityManager, 0, Integer.valueOf(i2), Boolean.valueOf(z))).booleanValue();
}
}
public static class x0 {
private static Method a = null;
private static Method b = null;
private static boolean c = false;
private static boolean a() {
b();
return a != null;
}
public static void b() {
if (c) {
return;
}
a = yd.q(View.class, "setBackground", new Class[]{Drawable.class});
b = yd.q(View.class, "setBackgroundDrawable", new Class[]{Drawable.class});
c = true;
}
public static void c(View view, Drawable drawable) {
if (a()) {
d(view, drawable);
} else {
e(view, drawable);
}
}
private static void d(View view, Drawable drawable) {
yd.u(a, view, -1, drawable);
}
private static void e(View view, Drawable drawable) {
yd.u(b, view, -1, drawable);
}
}
public static class y {
private static Method a = null;
private static boolean b = false;
public static boolean a() {
c();
return a != null;
}
public static String b(ContentProvider contentProvider) {
return (String) yd.s(a, contentProvider);
}
public static void c() {
if (b) {
return;
}
a = yd.p(ContentProvider.class, "getCallingPackage", 19);
b = true;
}
}
public static class y0 {
private static Method a = null;
private static Method b = null;
private static boolean c = false;
public static VpnService.Builder a(VpnService.Builder builder, String str) {
return (VpnService.Builder) yd.u(a, builder, -1, str);
}
public static VpnService.Builder b(VpnService.Builder builder, String str) {
return (VpnService.Builder) yd.u(b, builder, -1, str);
}
public static boolean c() {
d();
return a != null;
}
public static void d() {
if (c) {
return;
}
a = yd.r(VpnService.Builder.class, "addAllowedApplication", new Class[]{String.class}, 23);
b = yd.r(VpnService.Builder.class, "addDisallowedApplication", new Class[]{String.class}, 23);
c = true;
}
}
public static class z {
public static List<UriPermission> a(ContentResolver contentResolver) {
return contentResolver.getPersistedUriPermissions();
}
public static boolean b() {
return true;
}
public static void c(ContentResolver contentResolver, Uri uri, int i) {
try {
contentResolver.takePersistableUriPermission(uri, i);
} catch (Exception e) {
r7.l("Mirror", "Can't take persistable uri permission", e);
}
}
}
public static class z0 {
private static boolean a = false;
private static Method b;
private static Method c;
private static Method d;
private static Method e;
public static void a(WallpaperManager wallpaperManager, int i) {
yd.u(e, wallpaperManager, -1, Integer.valueOf(i));
}
public static ParcelFileDescriptor b(WallpaperManager wallpaperManager, int i) {
return (ParcelFileDescriptor) yd.u(d, wallpaperManager, -1, Integer.valueOf(i));
}
public static boolean c() {
e();
return c != null;
}
public static boolean d() {
e();
return b != null;
}
public static void e() {
if (!a) {
if (dq.T1()) {
Class cls = Integer.TYPE;
b = yd.q(WallpaperManager.class, "setBitmap", new Class[]{Bitmap.class, Rect.class, Boolean.TYPE, cls});
d = yd.q(WallpaperManager.class, "getWallpaperFile", new Class[]{cls});
e = yd.q(WallpaperManager.class, "clear", new Class[]{cls});
} else if (dq.S1()) {
c = yd.p(WallpaperManager.class, "isWallpaperSupported", 23);
}
}
a = true;
}
public static boolean f(WallpaperManager wallpaperManager) {
return ((Boolean) yd.t(c, wallpaperManager, 0)).booleanValue();
}
public static int g(WallpaperManager wallpaperManager, Bitmap bitmap, Rect rect, boolean z, int i) {
return ((Integer) yd.x(b, wallpaperManager, 1, bitmap, rect, Boolean.valueOf(z), Integer.valueOf(i))).intValue();
}
}
static {
HashMap<String, Class<?>> hashMap = new HashMap<>();
a = hashMap;
hashMap.put("int", Integer.TYPE);
hashMap.put("byte", Byte.TYPE);
hashMap.put("long", Long.TYPE);
hashMap.put("short", Short.TYPE);
hashMap.put("float", Float.TYPE);
hashMap.put("double", Double.TYPE);
hashMap.put("char", Character.TYPE);
hashMap.put("boolean", Boolean.TYPE);
}
public static void A(Method method, Exception exc) {
String name = method.getName();
if (exc.getClass().equals(InvocationTargetException.class)) {
InvocationTargetException invocationTargetException = (InvocationTargetException) exc;
String th2 = invocationTargetException.getCause().toString();
boolean z2 = !th2.startsWith(SecurityException.class.getName());
if ((method.getName().equals("setBackground") || method.getName().equals("setBackgroundDrawable")) && th2.startsWith("android.view.ViewRootImpl")) {
return;
}
r7.N("Mirror", z2, name + ": InvocationTarget: " + invocationTargetException.toString() + ", " + invocationTargetException.getTargetException().toString());
return;
}
if (!exc.getClass().equals(IllegalAccessException.class)) {
r7.f("Mirror", name + ": invoke: general exception: " + exc.toString());
return;
}
r7.f("Mirror", name + ": IllegalAccess: " + exc.toString() + ", " + exc.getCause());
}
private static void B(Method method, Class<?> cls, String str) {
if (method == null) {
StringBuilder sb = new StringBuilder();
sb.append(cls == null ? "null: " : cls.getName());
sb.append(".");
sb.append(str);
sb.append(": unavailable");
r7.f("Mirror", sb.toString());
}
}
public static Object c(Class<?> cls) {
try {
return cls.newInstance();
} catch (IllegalAccessException e2) {
r7.H("Mirror", "getNewObject " + cls.getName(), e2);
return null;
} catch (InstantiationException e3) {
r7.H("Mirror", "getNewObject " + cls.getName(), e3);
return null;
}
}
public static Object d(String str) {
Class<?> j2 = j(str);
if (j2 != null) {
return c(j2);
}
return null;
}
public static Field e(Class<?> cls, String str, boolean z2) {
Field field = null;
try {
field = z2 ? cls.getDeclaredField(str) : cls.getField(str);
if (field != null) {
field.setAccessible(true);
}
} catch (Exception unused) {
r7.f("Mirror", "getField: class: " + cls.getName() + ": no field: " + str);
}
return field;
}
public static Field f(Object obj, String str, boolean z2) {
return e(obj.getClass(), str, z2);
}
public static Object g(Object obj, String str) {
return h(obj, str, false);
}
private static Object h(Object obj, String str, boolean z2) {
Field f2 = f(obj, str, z2);
if (f2 != null) {
try {
return f2.get(obj);
} catch (Exception e2) {
r7.f("Mirror", "getFieldValue: " + e2.toString());
}
}
return null;
}
private static Method i(Class<?> cls, boolean z2, String str, Class<?>[] clsArr, int i2) {
Method method = null;
if (i2 <= 0 || dq.g() >= i2) {
try {
method = clsArr == null ? z2 ? cls.getDeclaredMethod(str, null) : cls.getMethod(str, null) : z2 ? cls.getDeclaredMethod(str, clsArr) : cls.getMethod(str, clsArr);
if (method != null) {
method.setAccessible(true);
}
} catch (NoSuchMethodException unused) {
} catch (Exception e2) {
r7.k("Mirror", "getMethodWrapper: " + e2.toString());
}
} else {
r7.f("Mirror", str + ": unavailable for Android version " + dq.g());
}
return method;
}
public static Class<?> j(String str) {
try {
return Class.forName(str);
} catch (ClassNotFoundException unused) {
r7.f("Mirror", str + ": unavailable");
return null;
}
}
public static Class<?> k(String str) {
if (str == null) {
return null;
}
Class<?> cls = a.get(str);
if (cls != null) {
return cls;
}
try {
return Class.forName(str);
} catch (ClassNotFoundException unused) {
return null;
}
}
public static Constructor<?> l(Class<?> cls, Class<?>[] clsArr, boolean z2) {
try {
return z2 ? cls.getDeclaredConstructor(clsArr) : cls.getConstructor(clsArr);
} catch (NoSuchMethodException unused) {
r7.f("Mirror", "nsm");
return null;
}
}
public static Method m(Class<?> cls, String str, Class<?>[] clsArr) {
Method i2 = i(cls, true, str, clsArr, 0);
B(i2, cls, str);
return i2;
}
public static Class<?> n(Class<?> cls, String str) {
for (Class<?> cls2 : cls.getInterfaces()) {
r7.f("Mirror", "compare: " + str + " with " + cls2.getName().toString());
if (cls2.getName().toString().equals(str)) {
return cls2;
}
}
return null;
}
public static Method o(Class<?> cls, String str) {
return r(cls, str, null, 0);
}
public static Method p(Class<?> cls, String str, int i2) {
return r(cls, str, null, i2);
}
public static Method q(Class<?> cls, String str, Class<?>[] clsArr) {
return r(cls, str, clsArr, 0);
}
public static Method r(Class<?> cls, String str, Class<?>[] clsArr, int i2) {
Method i3 = i(cls, false, str, clsArr, i2);
B(i3, cls, str);
return i3;
}
public static Object s(Method method, Object obj) {
return y(method, obj, -1, true, null);
}
public static Object t(Method method, Object obj, int i2) {
return y(method, obj, i2, true, null);
}
public static Object u(Method method, Object obj, int i2, Object obj2) {
return y(method, obj, i2, true, new Object[]{obj2});
}
public static Object v(Method method, Object obj, int i2, Object obj2, Object obj3) {
return y(method, obj, i2, true, new Object[]{obj2, obj3});
}
public static Object w(Method method, Object obj, int i2, Object obj2, Object obj3, Object obj4) {
return y(method, obj, i2, true, new Object[]{obj2, obj3, obj4});
}
public static Object x(Method method, Object obj, int i2, Object obj2, Object obj3, Object obj4, Object obj5) {
return y(method, obj, i2, true, new Object[]{obj2, obj3, obj4, obj5});
}
public static java.lang.Object y(java.lang.reflect.Method r16, java.lang.Object r17, int r18, boolean r19, java.lang.Object[] r20) {
throw new UnsupportedOperationException("Method not decompiled: net.dinglisch.android.taskerm.yd.y(java.lang.reflect.Method, java.lang.Object, int, boolean, java.lang.Object[]):java.lang.Object");
}
public static Object z(Method method, Object obj, int i2, Object obj2, Object obj3, Object obj4) {
return y(method, obj, i2, true, new Object[]{obj2, obj3, obj4});
}
}