1
0
Fork 0

Update MetadataManager.kt

This commit is contained in:
Torsten Grote 2024-04-16 14:18:00 -03:00 committed by GitHub
parent 2b465f81da
commit adca4ed196
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -312,7 +312,7 @@ internal class MetadataManager(
private fun getUserName(): String? {
val perm = "android.permission.QUERY_USERS"
return if (context.checkSelfPermission(perm) == PERMISSION_GRANTED) {
val userManager = context.getSystemService(UserManager::class.java) ?: return false
val userManager = context.getSystemService(UserManager::class.java) ?: return null
userManager.userName
} else null
}