Store App lock password hash in shared prefs

Add workflow release.yml
Fix R8 error
This commit is contained in:
BinTianqi
2025-04-13 09:05:05 +08:00
parent 5110536b59
commit a30a9abb3c
17 changed files with 99 additions and 106 deletions

View File

@@ -247,7 +247,13 @@ fun WorkModesScreen(
Icon(Icons.Default.MoreVert, null)
}
DropdownMenu(expanded, { expanded = false }) {
DropdownMenuItem({ Text(stringResource(R.string.deactivate)) }, { dialog = 4 })
DropdownMenuItem(
{ Text(stringResource(R.string.deactivate)) },
{
expanded = false
dialog = 4
}
)
if(!privilege.dhizuku && VERSION.SDK_INT >= 28) DropdownMenuItem(
{ Text(stringResource(R.string.transfer_ownership)) },
{
@@ -404,7 +410,10 @@ fun WorkModesScreen(
Text(stringResource(R.string.confirm))
}
},
onDismissRequest = {}
onDismissRequest = {
dialog = 0
if(operationSucceed && !params.canNavigateUp) onActivate()
}
)
if(dialog == 4) AlertDialog(
title = { Text(stringResource(R.string.deactivate)) },
@@ -422,6 +431,7 @@ fun WorkModesScreen(
dpm.clearProfileOwner(ComponentName(context, Receiver::class.java))
}
}
dialog = 0
updatePrivilege(context)
handlePrivilegeChange(context)
onDeactivate()
@@ -498,7 +508,7 @@ fun activateUsingDhizuku(context: Context, callback: (Boolean, Boolean, String?)
callback(true, false, null)
}
}
if(Dhizuku.init()) {
if(Dhizuku.init(context)) {
if(Dhizuku.isPermissionGranted()) {
doTransfer()
} else {
@@ -519,7 +529,7 @@ fun activateDhizukuMode(context: Context, callback: (Boolean, Boolean, String?)
SharedPrefs(context).dhizuku = true
callback(true, true, null)
}
if(Dhizuku.init()) {
if(Dhizuku.init(context)) {
if(Dhizuku.isPermissionGranted()) {
onSucceed()
} else {