mirror of https://github.com/M66B/FairEmail.git
Cleanup
This commit is contained in:
parent
bad858b7dc
commit
359e0fa73a
|
@ -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()) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue