Skip to content

Commit

Permalink
permission arrayList
Browse files Browse the repository at this point in the history
  • Loading branch information
rajashakher.valluru committed Jan 17, 2020
1 parent ffa8ef1 commit fd8a3e6
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ object PermissionsManager {
validatePermissions(context, permissions, callBack)
}

fun askPermissions(context: Context, permissions: ArrayList<String>, callBack: PermissionCallBack) {
validatePermissions(context, permissions.toArray() as Array<String>, callBack)
}

private fun validatePermissions(context: Context, permissions: Array<String>, callBack: PermissionCallBack) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
callBack.onAccepted(permissions.toCollection(ArrayList()))
Expand Down

0 comments on commit fd8a3e6

Please sign in to comment.