mirror of
https://codeberg.org/timelimit/timelimit-android.git
synced 2025-10-03 09:49:25 +02:00
Fix AndroidDeviceOwnerApi.getDelegations
This commit is contained in:
parent
178cb75795
commit
896cd6592d
1 changed files with 2 additions and 2 deletions
|
@ -87,9 +87,9 @@ class AndroidDeviceOwnerApi(
|
|||
if (VERSION.SDK_INT <= VERSION_CODES.O) throw IllegalStateException()
|
||||
|
||||
return delegationList.map { (scope, delegation) ->
|
||||
devicePolicyManager.getDelegatedScopes(componentName, scope).map { packageName ->
|
||||
devicePolicyManager.getDelegatePackages(componentName, scope)?.map { packageName ->
|
||||
Pair(packageName, delegation)
|
||||
}
|
||||
} ?: emptyList()
|
||||
}.flatten().groupBy { it.first }.mapValues { entry ->
|
||||
entry.value.map { it.second }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue