mirror of
https://github.com/awfixers-stuff/OwnDroid.git
synced 2026-03-24 03:16:00 +00:00
simplify code of app manage
This commit is contained in:
@@ -93,7 +93,7 @@ fun DeviceControl(myDpm: DevicePolicyManager, myComponent: ComponentName){
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun DeviceCtrlItem(
|
||||
private fun DeviceCtrlItem(
|
||||
itemName:Int,
|
||||
itemDesc:Int,
|
||||
myDpm: DevicePolicyManager,
|
||||
@@ -122,13 +122,14 @@ fun DeviceCtrlItem(
|
||||
}
|
||||
if(myDpm.isDeviceOwnerApp("com.binbin.androidowner")){
|
||||
isEnabled = getMethod()
|
||||
Switch(
|
||||
checked = isEnabled,
|
||||
onCheckedChange = {
|
||||
setMethod(!isEnabled)
|
||||
isEnabled=getMethod()
|
||||
}
|
||||
)
|
||||
}
|
||||
Switch(
|
||||
checked = isEnabled,
|
||||
onCheckedChange = {
|
||||
setMethod(!isEnabled)
|
||||
isEnabled=getMethod()
|
||||
},
|
||||
enabled = myDpm.isDeviceOwnerApp("com.binbin.androidowner")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user