Update the method to handle global su db

This commit is contained in:
topjohnwu
2018-01-31 04:00:11 +08:00
parent b05d2d3a2d
commit 3f55be9676
6 changed files with 87 additions and 138 deletions
@@ -119,7 +119,7 @@ public class MagiskManager extends Shell.ContainerApp {
} catch (PackageManager.NameNotFoundException ignored) { /* Expected */ }
}
suDB = SuDatabaseHelper.getSuDB(false);
suDB = SuDatabaseHelper.getInstance(this);
repoDB = new RepoDatabaseHelper(this);
defaultLocale = Locale.getDefault();
setLocale();
@@ -219,11 +219,6 @@ public class MagiskManager extends Shell.ContainerApp {
ret = Shell.Sync.su("echo \"$BOOTIMAGE\"");
if (Utils.isValidShellResponse(ret))
bootBlock = ret.get(0);
if (suDB != null && !SuDatabaseHelper.verified) {
suDB.close();
suDB = SuDatabaseHelper.getSuDB(true);
}
}
public void getDefaultInstallFlags() {