mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
feat: Deprecated onRequestPermissionResult in favour for onRequestPermissionsResult for consistency (#1047)
This commit is contained in:
parent
cab9840a03
commit
6b33772613
@ -414,9 +414,24 @@ public class CordovaPlugin {
|
||||
* @param requestCode
|
||||
* @param permissions
|
||||
* @param grantResults
|
||||
*
|
||||
* @deprecated Use {@link #onRequestPermissionsResult} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public void onRequestPermissionResult(int requestCode, String[] permissions,
|
||||
int[] grantResults) throws JSONException {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by the system when the user grants permissions
|
||||
*
|
||||
* @param requestCode
|
||||
* @param permissions
|
||||
* @param grantResults
|
||||
*/
|
||||
public void onRequestPermissionsResult(int requestCode, String[] permissions,
|
||||
int[] grantResults) throws JSONException {
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,9 @@ public class PermissionHelper {
|
||||
Arrays.fill(requestResults, PackageManager.PERMISSION_GRANTED);
|
||||
|
||||
try {
|
||||
// This one is deprecated - see https://github.com/apache/cordova-android/issues/592
|
||||
plugin.onRequestPermissionResult(requestCode, permissions, requestResults);
|
||||
plugin.onRequestPermissionsResult(requestCode, permissions, requestResults);
|
||||
} catch (JSONException e) {
|
||||
LOG.e(LOG_TAG, "JSONException when delivering permissions results", e);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user