|
|
@ -119,15 +119,13 @@ internal class Request : OnRequestPermissionsResultCallback { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fun getDeniedPermissions(permissions: Array<String>?): Array<String>? { |
|
|
|
fun getDeniedPermissions(permissions: Array<String>?): Array<String>? { |
|
|
|
|
|
|
|
val context = source?.context ?: return permissions |
|
|
|
if (permissions != null) { |
|
|
|
if (permissions != null) { |
|
|
|
val deniedPermissionList = ArrayList<String>() |
|
|
|
val deniedPermissionList = ArrayList<String>() |
|
|
|
for (permission in permissions) { |
|
|
|
for (permission in permissions) { |
|
|
|
if (source?.context?.let { |
|
|
|
if ( |
|
|
|
ContextCompat.checkSelfPermission( |
|
|
|
ContextCompat.checkSelfPermission(context, permission) |
|
|
|
it, |
|
|
|
!= PackageManager.PERMISSION_GRANTED |
|
|
|
permission |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
} != PackageManager.PERMISSION_GRANTED |
|
|
|
|
|
|
|
) { |
|
|
|
) { |
|
|
|
deniedPermissionList.add(permission) |
|
|
|
deniedPermissionList.add(permission) |
|
|
|
} |
|
|
|
} |
|
|
|