mirror of
https://github.com/awfixers-stuff/OwnDroid.git
synced 2026-03-23 11:05:59 +00:00
Optimize code
New Privilege object, which follows Application lifecycle. Add Privilege.DPM and Privilege.DAR variable, instead of creating DPM and DAR instance every time.
This commit is contained in:
@@ -125,7 +125,6 @@ private fun AppInstaller(
|
||||
result: Intent? = null,
|
||||
onResultDialogClose: () -> Unit = {}
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
var appLockDialog by rememberSaveable { mutableStateOf(false) }
|
||||
val coroutine = rememberCoroutineScope()
|
||||
Scaffold(
|
||||
@@ -142,7 +141,7 @@ private fun AppInstaller(
|
||||
else Icon(Icons.Default.PlayArrow, null)
|
||||
},
|
||||
onClick = {
|
||||
if(SharedPrefs(context).lockPasswordHash.isNullOrEmpty()) onStartInstall() else appLockDialog = true
|
||||
if(SP.lockPasswordHash.isNullOrEmpty()) onStartInstall() else appLockDialog = true
|
||||
},
|
||||
expanded = !installing
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user