update docs about setUserControlDisabledPackages

use annotation instead of proguard rules to keep ShizukuService
hide profile owner entry if device owner is activated
This commit is contained in:
BinTianqi
2024-04-27 12:12:55 +08:00
parent fc091dbf83
commit b5ebf7b6fa
4 changed files with 12 additions and 8 deletions

View File

@@ -12,7 +12,6 @@
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-keep class com.bintianqi.owndroid.dpm.ShizukuService
# Uncomment this to preserve the line number information for
# debugging stack traces.

View File

@@ -112,10 +112,12 @@ private fun Home(localNavCtrl:NavHostController,listScrollState:ScrollState){
R.string.device_admin, stringResource(if(myDpm.isAdminActive(myComponent)){R.string.activated}else{R.string.deactivated}),
operation = {localNavCtrl.navigate("DeviceAdmin")}
)
SubPageItem(
R.string.profile_owner, stringResource(if(isProfileOwner(myDpm)){R.string.activated}else{R.string.deactivated}),
operation = {localNavCtrl.navigate("ProfileOwner")}
)
if(!isDeviceOwner(myDpm)){
SubPageItem(
R.string.profile_owner, stringResource(if(isProfileOwner(myDpm)){R.string.activated}else{R.string.deactivated}),
operation = {localNavCtrl.navigate("ProfileOwner")}
)
}
SubPageItem(
R.string.device_owner, stringResource(if(isDeviceOwner(myDpm)){R.string.activated}else{R.string.deactivated}),
operation = {localNavCtrl.navigate("DeviceOwner")}

View File

@@ -2,12 +2,14 @@ package com.bintianqi.owndroid.dpm
import android.os.IBinder
import android.system.Os
import androidx.annotation.Keep
import com.bintianqi.owndroid.IUserService
import java.io.BufferedReader
import java.io.InputStreamReader
var service:IUserService? = null
@Keep
class ShizukuService: IUserService.Stub() {
override fun asBinder(): IBinder {
TODO("Not yet implemented")