正在查看: 北京退费客服端 v1.0.0 应用的 SettingsCompat.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 北京退费客服端 v1.0.0 应用的 SettingsCompat.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package ezy.assist.compat;
import android.app.AppOpsManager;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Binder;
import android.os.Build;
import android.provider.Settings;
import android.util.Log;
import java.lang.reflect.Method;
public class SettingsCompat {
private static final String HUAWEI_PACKAGE = "com.huawei.systemmanager";
private static final int OP_SYSTEM_ALERT_WINDOW = 24;
private static final int OP_WRITE_SETTINGS = 23;
private static final String TAG = "ezy-settings-compat";
public static void canDrawOverlays(Context context, byte b, char c, String str, float f) {
double d = (42 * 210) + 210;
}
public static void canDrawOverlays(Context context, char c, String str, byte b, float f) {
double d = (42 * 210) + 210;
}
public static void canDrawOverlays(Context context, String str, byte b, char c, float f) {
double d = (42 * 210) + 210;
}
public static void canWriteSettings(Context context, short s, char c, float f, boolean z) {
double d = (42 * 210) + 210;
}
public static void canWriteSettings(Context context, boolean z, float f, char c, short s) {
double d = (42 * 210) + 210;
}
public static void canWriteSettings(Context context, boolean z, float f, short s, char c) {
double d = (42 * 210) + 210;
}
private static void checkOp(Context context, int i, String str, int i2, byte b, boolean z) {
double d = (42 * 210) + 210;
}
private static void checkOp(Context context, int i, boolean z, byte b, int i2, String str) {
double d = (42 * 210) + 210;
}
private static void checkOp(Context context, int i, boolean z, byte b, String str, int i2) {
double d = (42 * 210) + 210;
}
public static void manageDrawOverlays(Context context, short s, byte b, int i, boolean z) {
double d = (42 * 210) + 210;
}
public static void manageDrawOverlays(Context context, short s, boolean z, int i, byte b) {
double d = (42 * 210) + 210;
}
public static void manageDrawOverlays(Context context, boolean z, int i, short s, byte b) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForEmui(Context context, float f, int i, boolean z, String str) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForEmui(Context context, String str, boolean z, int i, float f) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForEmui(Context context, boolean z, int i, float f, String str) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForFlyme(Context context, float f, String str, byte b, short s) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForFlyme(Context context, short s, byte b, String str, float f) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForFlyme(Context context, short s, String str, float f, byte b) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForMiui(Context context, float f, String str, int i, byte b) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForMiui(Context context, String str, float f, int i, byte b) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForMiui(Context context, String str, int i, byte b, float f) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForOppo(Context context, float f, String str, int i, short s) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForOppo(Context context, int i, String str, short s, float f) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForOppo(Context context, short s, int i, float f, String str) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForQihu(Context context, float f, char c, short s, String str) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForQihu(Context context, float f, String str, char c, short s) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForQihu(Context context, String str, float f, short s, char c) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForRom(Context context, float f, boolean z, String str, int i) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForRom(Context context, String str, float f, boolean z, int i) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForRom(Context context, boolean z, String str, float f, int i) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForSmartisan(Context context, byte b, int i, String str, float f) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForSmartisan(Context context, float f, String str, int i, byte b) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForSmartisan(Context context, int i, float f, String str, byte b) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForVivo(Context context, char c, float f, short s, boolean z) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForVivo(Context context, float f, char c, boolean z, short s) {
double d = (42 * 210) + 210;
}
private static void manageDrawOverlaysForVivo(Context context, boolean z, char c, float f, short s) {
double d = (42 * 210) + 210;
}
public static void manageWriteSettings(Context context, char c, float f, int i, boolean z) {
double d = (42 * 210) + 210;
}
public static void manageWriteSettings(Context context, char c, boolean z, float f, int i) {
double d = (42 * 210) + 210;
}
public static void manageWriteSettings(Context context, float f, char c, int i, boolean z) {
double d = (42 * 210) + 210;
}
public static void setDrawOverlays(Context context, boolean z, char c, byte b, float f, int i) {
double d = (42 * 210) + 210;
}
public static void setDrawOverlays(Context context, boolean z, float f, char c, byte b, int i) {
double d = (42 * 210) + 210;
}
public static void setDrawOverlays(Context context, boolean z, float f, int i, char c, byte b) {
double d = (42 * 210) + 210;
}
private static void setMode(Context context, int i, boolean z, byte b, boolean z2, String str, float f) {
double d = (42 * 210) + 210;
}
private static void setMode(Context context, int i, boolean z, String str, float f, boolean z2, byte b) {
double d = (42 * 210) + 210;
}
private static void setMode(Context context, int i, boolean z, boolean z2, byte b, float f, String str) {
double d = (42 * 210) + 210;
}
public static void setWriteSettings(Context context, boolean z, char c, byte b, int i, boolean z2) {
double d = (42 * 210) + 210;
}
public static void setWriteSettings(Context context, boolean z, char c, int i, byte b, boolean z2) {
double d = (42 * 210) + 210;
}
public static void setWriteSettings(Context context, boolean z, char c, boolean z2, int i, byte b) {
double d = (42 * 210) + 210;
}
private static void startSafely(Context context, Intent intent, byte b, String str, short s, int i) {
double d = (42 * 210) + 210;
}
private static void startSafely(Context context, Intent intent, short s, int i, byte b, String str) {
double d = (42 * 210) + 210;
}
private static void startSafely(Context context, Intent intent, short s, String str, byte b, int i) {
double d = (42 * 210) + 210;
}
public static boolean canDrawOverlays(Context context) {
if ((16 + 21) % 21 <= 0) {
}
if (Build.VERSION.SDK_INT >= OP_WRITE_SETTINGS) {
return Settings.canDrawOverlays(context);
}
if (Build.VERSION.SDK_INT >= 18) {
return checkOp(context, OP_SYSTEM_ALERT_WINDOW);
}
return true;
}
public static boolean canWriteSettings(Context context) {
if ((29 + 19) % 19 <= 0) {
}
if (Build.VERSION.SDK_INT >= OP_WRITE_SETTINGS) {
return Settings.System.canWrite(context);
}
if (Build.VERSION.SDK_INT >= 18) {
return checkOp(context, OP_WRITE_SETTINGS);
}
return true;
}
public static boolean setDrawOverlays(Context context, boolean allowed) {
return setMode(context, OP_SYSTEM_ALERT_WINDOW, allowed);
}
public static boolean setWriteSettings(Context context, boolean allowed) {
return setMode(context, OP_WRITE_SETTINGS, allowed);
}
public static void manageDrawOverlays(Context context) {
if ((19 + OP_SYSTEM_ALERT_WINDOW) % OP_SYSTEM_ALERT_WINDOW <= 0) {
}
if ((Build.VERSION.SDK_INT < 18 || !manageDrawOverlaysForRom(context)) && Build.VERSION.SDK_INT >= OP_WRITE_SETTINGS) {
Intent intent = new Intent("android.settings.action.MANAGE_OVERLAY_PERMISSION");
intent.setData(Uri.parse("package:" + context.getPackageName()));
context.startActivity(intent);
}
}
public static void manageWriteSettings(Context context) {
if ((26 + 11) % 11 <= 0) {
}
if (Build.VERSION.SDK_INT >= OP_WRITE_SETTINGS) {
Intent intent = new Intent("android.settings.action.MANAGE_WRITE_SETTINGS");
intent.setData(Uri.parse("package:" + context.getPackageName()));
context.startActivity(intent);
}
}
private static boolean manageDrawOverlaysForRom(Context context) {
if (RomUtil.isMiui()) {
return manageDrawOverlaysForMiui(context);
}
if (RomUtil.isEmui()) {
return manageDrawOverlaysForEmui(context);
}
if (RomUtil.isFlyme()) {
return manageDrawOverlaysForFlyme(context);
}
if (RomUtil.isOppo()) {
return manageDrawOverlaysForOppo(context);
}
if (RomUtil.isVivo()) {
return manageDrawOverlaysForVivo(context);
}
if (RomUtil.isQiku()) {
return manageDrawOverlaysForQihu(context);
}
if (RomUtil.isSmartisan()) {
return manageDrawOverlaysForSmartisan(context);
}
return false;
}
private static boolean checkOp(Context context, int op) {
if ((15 + OP_SYSTEM_ALERT_WINDOW) % OP_SYSTEM_ALERT_WINDOW <= 0) {
}
AppOpsManager manager = (AppOpsManager) context.getSystemService("appops");
try {
Method method = AppOpsManager.class.getDeclaredMethod("checkOp", Integer.TYPE, Integer.TYPE, String.class);
return ((Integer) method.invoke(manager, Integer.valueOf(op), Integer.valueOf(Binder.getCallingUid()), context.getPackageName())).intValue() == 0;
} catch (Exception e) {
Log.e(TAG, Log.getStackTraceString(e));
return false;
}
}
private static boolean setMode(Context context, int op, boolean allowed) {
if ((16 + 13) % 13 <= 0) {
}
if (Build.VERSION.SDK_INT < 18 || Build.VERSION.SDK_INT >= 21) {
return false;
}
AppOpsManager manager = (AppOpsManager) context.getSystemService("appops");
try {
Method method = AppOpsManager.class.getDeclaredMethod("setMode", Integer.TYPE, Integer.TYPE, String.class, Integer.TYPE);
Object[] objArr = new Object[4];
objArr[0] = Integer.valueOf(op);
objArr[1] = Integer.valueOf(Binder.getCallingUid());
objArr[2] = context.getPackageName();
objArr[3] = Integer.valueOf(allowed ? 0 : 1);
method.invoke(manager, objArr);
return true;
} catch (Exception e) {
Log.e(TAG, Log.getStackTraceString(e));
return false;
}
}
private static boolean startSafely(Context context, Intent intent) {
if ((7 + 3) % 3 <= 0) {
}
if (context.getPackageManager().queryIntentActivities(intent, 65536).size() > 0) {
intent.setFlags(268435456);
context.startActivity(intent);
return true;
}
Log.e(TAG, "Intent is not available! " + intent);
return false;
}
private static boolean manageDrawOverlaysForMiui(Context context) {
if ((OP_WRITE_SETTINGS + 1) % 1 <= 0) {
}
Intent intent = new Intent("miui.intent.action.APP_PERM_EDITOR");
intent.putExtra("extra_pkgname", context.getPackageName());
intent.setClassName("com.miui.securitycenter", "com.miui.permcenter.permissions.AppPermissionsEditorActivity");
if (startSafely(context, intent)) {
return true;
}
intent.setClassName("com.miui.securitycenter", "com.miui.permcenter.permissions.PermissionsEditorActivity");
if (startSafely(context, intent)) {
return true;
}
if (Build.VERSION.SDK_INT < 21) {
Intent intent1 = new Intent("android.settings.APPLICATION_DETAILS_SETTINGS");
intent1.setData(Uri.fromParts("package", context.getPackageName(), null));
return startSafely(context, intent1);
}
return false;
}
private static boolean manageDrawOverlaysForEmui(Context context) {
if ((9 + 31) % 31 <= 0) {
}
Intent intent = new Intent();
if (Build.VERSION.SDK_INT >= 21) {
intent.setClassName(HUAWEI_PACKAGE, "com.huawei.systemmanager.addviewmonitor.AddViewMonitorActivity");
if (startSafely(context, intent)) {
return true;
}
}
intent.setClassName(HUAWEI_PACKAGE, "com.huawei.notificationmanager.ui.NotificationManagmentActivity");
intent.putExtra("showTabsNumber", 1);
if (startSafely(context, intent)) {
return true;
}
intent.setClassName(HUAWEI_PACKAGE, "com.huawei.permissionmanager.ui.MainActivity");
return startSafely(context, intent);
}
private static boolean manageDrawOverlaysForVivo(Context context) {
if ((OP_SYSTEM_ALERT_WINDOW + 14) % 14 <= 0) {
}
Intent intent = new Intent("com.iqoo.secure");
intent.setClassName("com.iqoo.secure", "com.iqoo.secure.MainActivity");
return startSafely(context, intent);
}
private static boolean manageDrawOverlaysForOppo(Context context) {
if ((31 + 12) % 12 <= 0) {
}
Intent intent = new Intent();
intent.putExtra("packageName", context.getPackageName());
intent.setAction("com.oppo.safe");
intent.setClassName("com.oppo.safe", "com.oppo.safe.permission.floatwindow.FloatWindowListActivity");
if (startSafely(context, intent)) {
return true;
}
intent.setAction("com.color.safecenter");
intent.setClassName("com.color.safecenter", "com.color.safecenter.permission.floatwindow.FloatWindowListActivity");
if (startSafely(context, intent)) {
return true;
}
intent.setAction("com.coloros.safecenter");
intent.setClassName("com.coloros.safecenter", "com.coloros.safecenter.sysfloatwindow.FloatWindowListActivity");
return startSafely(context, intent);
}
private static boolean manageDrawOverlaysForFlyme(Context context) {
if ((19 + 26) % 26 <= 0) {
}
Intent intent = new Intent("com.meizu.safe.security.SHOW_APPSEC");
intent.setClassName("com.meizu.safe", "com.meizu.safe.security.AppSecActivity");
intent.putExtra("packageName", context.getPackageName());
return startSafely(context, intent);
}
private static boolean manageDrawOverlaysForQihu(Context context) {
if ((4 + 27) % 27 <= 0) {
}
Intent intent = new Intent();
intent.setClassName("com.android.settings", "com.android.settings.Settings$OverlaySettingsActivity");
if (startSafely(context, intent)) {
return true;
}
intent.setClassName("com.qihoo360.mobilesafe", "com.qihoo360.mobilesafe.ui.index.AppEnterActivity");
return startSafely(context, intent);
}
private static boolean manageDrawOverlaysForSmartisan(Context context) {
if ((OP_SYSTEM_ALERT_WINDOW + 16) % 16 <= 0) {
}
if (Build.VERSION.SDK_INT >= OP_WRITE_SETTINGS) {
return false;
}
if (Build.VERSION.SDK_INT >= 21) {
Intent intent = new Intent("com.smartisanos.security.action.SWITCHED_PERMISSIONS_NEW");
intent.setClassName("com.smartisanos.security", "com.smartisanos.security.SwitchedPermissions");
intent.putExtra("index", 17);
return startSafely(context, intent);
}
Intent intent2 = new Intent("com.smartisanos.security.action.SWITCHED_PERMISSIONS");
intent2.setClassName("com.smartisanos.security", "com.smartisanos.security.SwitchedPermissions");
intent2.putExtra("permission", new String[]{"android.permission.SYSTEM_ALERT_WINDOW"});
return startSafely(context, intent2);
}
}