aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/permissions/PermissionManager.kt8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/main/kotlin/ca/allanwang/kau/permissions/PermissionManager.kt b/core/src/main/kotlin/ca/allanwang/kau/permissions/PermissionManager.kt
index 769a9fb..4d97070 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/permissions/PermissionManager.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/permissions/PermissionManager.kt
@@ -41,12 +41,12 @@ internal object PermissionManager {
/**
* Retrieve permissions requested in our manifest
*/
- private val manifestPermission = lazyContext<Array<String>> {
+ private val manifestPermission = lazyContext<Set<String>> {
try {
- it.packageManager.getPackageInfo(it.packageName, PackageManager.GET_PERMISSIONS)?.requestedPermissions
- ?: emptyArray()
+ it.packageManager.getPackageInfo(it.packageName, PackageManager.GET_PERMISSIONS)?.requestedPermissions?.toSet()
+ ?: emptySet()
} catch (e: Exception) {
- emptyArray()
+ emptySet()
}
}