Guard env state behind cached objects

This commit is contained in:
topjohnwu
2019-10-22 15:37:55 -04:00
parent 9656878ef3
commit a18c552ddf
9 changed files with 68 additions and 28 deletions
@@ -38,7 +38,7 @@ object Shortcuts {
.setRank(0)
.build())
}
if (root && Config.magiskHide) {
if (root && Info.env.magiskHide) {
shortCuts.add(ShortcutInfo.Builder(context, "magiskhide")
.setShortLabel(context.getString(R.string.magiskhide))
.setIntent(Intent(intent)
@@ -49,7 +49,7 @@ object Shortcuts {
.setRank(1)
.build())
}
if (!Config.coreOnly && root && Info.magiskVersionCode >= 0) {
if (!Config.coreOnly && root && Info.env.magiskVersionCode >= 0) {
shortCuts.add(ShortcutInfo.Builder(context, "modules")
.setShortLabel(context.getString(R.string.modules))
.setIntent(Intent(intent)