Fix: system shell
This commit is contained in:
@ -261,27 +261,22 @@ class NeoTermActivity : AppCompatActivity(), ServiceConnection, SharedPreference
|
|||||||
|
|
||||||
if (!isRecreating()) {
|
if (!isRecreating()) {
|
||||||
BaseFileInstaller.installBaseFiles(this, resultListener)
|
BaseFileInstaller.installBaseFiles(this, resultListener)
|
||||||
|
} else {
|
||||||
|
systemShell = NeoPreference.loadBoolean("system_shell", true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSaveInstanceState(outState: Bundle?) {
|
|
||||||
super.onSaveInstanceState(outState)
|
|
||||||
outState?.putBoolean("system_shell", systemShell)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onRestoreInstanceState(savedInstanceState: Bundle?) {
|
|
||||||
super.onRestoreInstanceState(savedInstanceState)
|
|
||||||
systemShell = savedInstanceState?.getBoolean("system_shell", true) ?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun recreate() {
|
override fun recreate() {
|
||||||
NeoPreference.store("recreate", true)
|
NeoPreference.store("recreate", true)
|
||||||
|
NeoPreference.store("system_shell", systemShell)
|
||||||
super.recreate()
|
super.recreate()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun isRecreating(): Boolean {
|
private fun isRecreating(): Boolean {
|
||||||
val result = peekRecreating()
|
val result = peekRecreating()
|
||||||
|
if (result) {
|
||||||
NeoPreference.store("recreate", !result)
|
NeoPreference.store("recreate", !result)
|
||||||
|
}
|
||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user