Contexts are different: Make context clearer

This commit is contained in:
topjohnwu
2017-02-12 05:02:18 +08:00
parent d1b5ebad7d
commit b07361580a
16 changed files with 72 additions and 69 deletions

View File

@@ -140,13 +140,8 @@ public class Utils {
return Integer.parseInt(prefs.getString(key, String.valueOf(def)));
}
public static void checkAndStartMagiskHide() {
String command = "ps | grep magiskhide >/dev/null; echo $?";
List<String> ret = Shell.su(command);
if (!isValidShellResponse(ret))
return;
if (Integer.parseInt(ret.get(0)) != 0)
new Async.MagiskHide().enable();
public static MagiskManager getMagiskManager(Context context) {
return (MagiskManager) context.getApplicationContext();
}
}