mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-10-16 12:49:48 +00:00
Enhance EMUI 9 user experience
This commit is contained in:
@@ -37,6 +37,7 @@ public class Data {
|
||||
// Install flags
|
||||
public static boolean keepVerity = false;
|
||||
public static boolean keepEnc = false;
|
||||
public static boolean recovery = false;
|
||||
|
||||
// Configs
|
||||
public static boolean isDarkTheme;
|
||||
|
@@ -42,6 +42,7 @@ public class RootUtils extends Shell.Initializer {
|
||||
|
||||
Data.keepVerity = Boolean.parseBoolean(ShellUtils.fastCmd("echo $KEEPVERITY"));
|
||||
Data.keepEnc = Boolean.parseBoolean(ShellUtils.fastCmd("echo $KEEPFORCEENCRYPT"));
|
||||
Data.recovery = Boolean.parseBoolean(ShellUtils.fastCmd("echo $RECOVERYMODE"));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@@ -122,4 +122,8 @@ public class Utils {
|
||||
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.N ?
|
||||
App.self.createDeviceProtectedStorageContext() : App.self;
|
||||
}
|
||||
|
||||
public static void reboot() {
|
||||
Shell.su("/system/bin/reboot" + (Data.recovery ? " recovery" : "")).submit();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user