mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-04-23 19:32:16 +00:00
Fix: Only Ask for root permission when selected
This commit is contained in:
parent
6239c9c5f7
commit
ba6e5a92ea
@ -188,12 +188,9 @@ class SettingsFragment : ScreenFragment() {
|
|||||||
preferences[Preferences.Key.ProxyHost]?.setEnabled(enabled)
|
preferences[Preferences.Key.ProxyHost]?.setEnabled(enabled)
|
||||||
preferences[Preferences.Key.ProxyPort]?.setEnabled(enabled)
|
preferences[Preferences.Key.ProxyPort]?.setEnabled(enabled)
|
||||||
}
|
}
|
||||||
if (key != null && !(Shell.getCachedShell()?.isRoot ?: Shell.getShell().isRoot)
|
if (key == Preferences.Key.RootPermission) {
|
||||||
) {
|
preferences[Preferences.Key.RootPermission]?.setEnabled(Shell.getCachedShell()?.isRoot
|
||||||
Preferences[Preferences.Key.RootPermission] = false
|
?: Shell.getShell().isRoot)
|
||||||
preferences[Preferences.Key.RootPermission]?.setEnabled(false)
|
|
||||||
} else if (Shell.getCachedShell()?.isRoot ?: Shell.getShell().isRoot) {
|
|
||||||
preferences[Preferences.Key.RootPermission]?.setEnabled(true)
|
|
||||||
}
|
}
|
||||||
if (key == Preferences.Key.Theme) {
|
if (key == Preferences.Key.Theme) {
|
||||||
requireActivity().recreate()
|
requireActivity().recreate()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user