Add WorkModesScreen

Update dependency
Remove some Shizuku features
This commit is contained in:
BinTianqi
2025-04-12 21:39:11 +08:00
parent 6c92c7dcbe
commit 5110536b59
18 changed files with 567 additions and 616 deletions

View File

@@ -61,17 +61,8 @@ val Context.isProfileOwner: Boolean
return dpm.isProfileOwnerApp("com.bintianqi.owndroid")
}
val Context.dpcPackageName: String
get() {
return if(SharedPrefs(this).dhizuku) {
Dhizuku.getOwnerPackageName()
} else {
"com.bintianqi.owndroid"
}
}
@SuppressLint("PrivateApi")
private fun binderWrapperDevicePolicyManager(appContext: Context): DevicePolicyManager? {
fun binderWrapperDevicePolicyManager(appContext: Context): DevicePolicyManager? {
try {
val context = appContext.createPackageContext(Dhizuku.getOwnerComponent().packageName, Context.CONTEXT_IGNORE_SECURITY)
val manager = context.getSystemService(Context.DEVICE_POLICY_SERVICE) as DevicePolicyManager