mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-01 05:55:26 +00:00
Fix the issue that installation configs won't stick
This commit is contained in:
parent
26038a0a07
commit
96650c06f0
@ -138,13 +138,9 @@ public class MagiskFragment extends Fragment
|
|||||||
setupExpandable();
|
setupExpandable();
|
||||||
|
|
||||||
keepVerityChkbox.setChecked(mm.keepVerity);
|
keepVerityChkbox.setChecked(mm.keepVerity);
|
||||||
keepVerityChkbox.setOnCheckedChangeListener((view, isChecked) -> {
|
keepVerityChkbox.setOnCheckedChangeListener((view, checked) -> mm.keepVerity = checked);
|
||||||
mm.keepVerity = isChecked;
|
|
||||||
});
|
|
||||||
keepEncChkbox.setChecked(mm.keepEnc);
|
keepEncChkbox.setChecked(mm.keepEnc);
|
||||||
keepEncChkbox.setOnCheckedChangeListener((view, isChecked) -> {
|
keepEncChkbox.setOnCheckedChangeListener((view, checked) -> mm.keepEnc = checked);
|
||||||
mm.keepEnc = isChecked;
|
|
||||||
});
|
|
||||||
|
|
||||||
mSwipeRefreshLayout.setOnRefreshListener(this);
|
mSwipeRefreshLayout.setOnRefreshListener(this);
|
||||||
updateUI();
|
updateUI();
|
||||||
|
@ -212,6 +212,14 @@ public class MagiskManager extends Application {
|
|||||||
if (Utils.isValidShellResponse(ret))
|
if (Utils.isValidShellResponse(ret))
|
||||||
bootBlock = ret.get(0);
|
bootBlock = ret.get(0);
|
||||||
|
|
||||||
|
if (suDB != null && !SuDatabaseHelper.verified) {
|
||||||
|
suDB.close();
|
||||||
|
suDB = new SuDatabaseHelper();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getDefaultInstallFlags() {
|
||||||
|
List<String> ret;
|
||||||
ret = Shell.su("echo \"$DTBOIMAGE\"");
|
ret = Shell.su("echo \"$DTBOIMAGE\"");
|
||||||
if (Utils.isValidShellResponse(ret))
|
if (Utils.isValidShellResponse(ret))
|
||||||
keepVerity = true;
|
keepVerity = true;
|
||||||
@ -235,11 +243,6 @@ public class MagiskManager extends Application {
|
|||||||
if (Utils.isValidShellResponse(ret))
|
if (Utils.isValidShellResponse(ret))
|
||||||
keepEnc = Boolean.parseBoolean(ret.get(0));
|
keepEnc = Boolean.parseBoolean(ret.get(0));
|
||||||
} catch (NumberFormatException ignored) {}
|
} catch (NumberFormatException ignored) {}
|
||||||
|
|
||||||
if (suDB != null && !SuDatabaseHelper.verified) {
|
|
||||||
suDB.close();
|
|
||||||
suDB = new SuDatabaseHelper();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPermissionGrantCallback(Runnable callback) {
|
public void setPermissionGrantCallback(Runnable callback) {
|
||||||
|
@ -34,6 +34,7 @@ public class SplashActivity extends Activity {
|
|||||||
MagiskManager mm = getMagiskManager();
|
MagiskManager mm = getMagiskManager();
|
||||||
|
|
||||||
mm.loadMagiskInfo();
|
mm.loadMagiskInfo();
|
||||||
|
mm.getDefaultInstallFlags();
|
||||||
Utils.loadPrefs();
|
Utils.loadPrefs();
|
||||||
|
|
||||||
// Dynamic detect all locales
|
// Dynamic detect all locales
|
||||||
|
Loading…
Reference in New Issue
Block a user