diff --git a/app/src/main/java/eu/faircode/email/DebugHelper.java b/app/src/main/java/eu/faircode/email/DebugHelper.java index d789bd7666..4a8f41e50e 100644 --- a/app/src/main/java/eu/faircode/email/DebugHelper.java +++ b/app/src/main/java/eu/faircode/email/DebugHelper.java @@ -271,10 +271,7 @@ public class DebugHelper { Build.VERSION.RELEASE, Build.VERSION.SDK_INT, Helper.getTargetSdk(context))); String miui = Helper.getMIUIVersion(); - Integer autostart = (miui == null ? null : Helper.getMIUIAutostart(context)); - sb.append(String.format("MIUI: %s autostart: %s\r\n", - miui == null ? "-" : miui, - autostart == null ? "?" : Boolean.toString(autostart == 0))); + sb.append(String.format("MIUI: %s\r\n", miui == null ? "-" : miui)); boolean reporting = prefs.getBoolean("crash_reports", false); if (reporting || Log.isTestRelease()) { diff --git a/app/src/main/java/eu/faircode/email/Helper.java b/app/src/main/java/eu/faircode/email/Helper.java index db97321c1b..cfa8fee020 100644 --- a/app/src/main/java/eu/faircode/email/Helper.java +++ b/app/src/main/java/eu/faircode/email/Helper.java @@ -1687,20 +1687,6 @@ public class Helper { } } - // 0=allowed, 1=denied - static Integer getMIUIAutostart(Context context) { - try { - @SuppressLint("PrivateApi") - Class c = Class.forName("android.miui.AppOpsUtils"); - Method m = c.getDeclaredMethod("getApplicationAutoStart", Context.class, String.class); - m.setAccessible(true); - return (Integer) m.invoke(null, context, context.getPackageName()); - } catch (Throwable ex) { - Log.w(ex); - return null; - } - } - static String getUiModeType(Context context) { try { UiModeManager uimm = Helper.getSystemService(context, UiModeManager.class);