diff --git a/.github/JAR Source/RuntimePermissionsFragment.java b/.github/JAR Source/RuntimePermissionsFragment.java index 7d4adb5..7648991 100644 --- a/.github/JAR Source/RuntimePermissionsFragment.java +++ b/.github/JAR Source/RuntimePermissionsFragment.java @@ -89,12 +89,20 @@ public void onRequestPermissionsResult( int requestCode, String[] permissions, i else resolvedPermissionCount++; - if( grantResults[i] == PackageManager.PERMISSION_GRANTED ) - permissionsResult.set( permissionIndex, 1 ); - else if( !shouldShowRequestPermissionRationale( permission ) ) + try + { + if( grantResults[i] == PackageManager.PERMISSION_GRANTED ) + permissionsResult.set( permissionIndex, 1 ); + else if( !shouldShowRequestPermissionRationale( permission ) ) // This can cause IllegalArgumentException for undocumented permissions + permissionsResult.set( permissionIndex, 0 ); + else + permissionsResult.set( permissionIndex, 2 ); + } + catch( Exception e ) + { + Log.e( "Unity", "Exception:", e ); permissionsResult.set( permissionIndex, 0 ); - else - permissionsResult.set( permissionIndex, 2 ); + } } if( resolvedPermissionCount != m_permissions.length ) diff --git a/Plugins/AndroidRuntimePermissions/Android/RuntimePermissions.jar b/Plugins/AndroidRuntimePermissions/Android/RuntimePermissions.jar index 7f59f28..900a769 100644 Binary files a/Plugins/AndroidRuntimePermissions/Android/RuntimePermissions.jar and b/Plugins/AndroidRuntimePermissions/Android/RuntimePermissions.jar differ diff --git a/package.json b/package.json index 8feb981..3de531b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "com.yasirkula.androidruntimepermissions", "displayName": "Android Runtime Permissions", - "version": "1.1.0", + "version": "1.1.3", "description": "This plugin helps you query/request runtime permissions synchronously on Android M and later. It also works on older Android versions and detects whether a requested permission is declared in AndroidManifest or not." } \ No newline at end of file