Skip to content

Commit 9557506

Browse files
committedFeb 15, 2025
Document onRequestPermissionResult
- Method is called after onRequestPermissionsResult was called by the system from CordovaActivity - Add documentation link for Android method onRequestPermissionsResult - Document, that the second method onRequestPermissionsResult is not save to use
1 parent eb0f002 commit 9557506

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎framework/src/org/apache/cordova/CordovaPlugin.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -416,11 +416,13 @@ public boolean hasPermisssion() {
416416
}
417417

418418
/**
419-
* Called by the system when the user grants permissions
419+
* Called when the user grants permissions.
420+
* Forwarded from {@link CordovaActivity#onRequestPermissionsResult(int, String[], int[])}.
420421
*
421422
* @param requestCode
422423
* @param permissions
423424
* @param grantResults
425+
* @see https://developer.android.com/reference/android/app/Activity#onRequestPermissionsResult(int,%20java.lang.String[],%20int[])
424426
* @deprecated Use {@link #onRequestPermissionsResult} instead.
425427
*/
426428
@Deprecated
@@ -430,11 +432,13 @@ public void onRequestPermissionResult(int requestCode, String[] permissions,
430432
}
431433

432434
/**
433-
* Called by the system when the user grants permissions
435+
* Called when the user grants permissions. Do not use it.
436+
* This is currently not called by {@link CordovaActivity}, just by {@link PermissionHelper}, which is not used currently.
434437
*
435438
* @param requestCode
436439
* @param permissions
437440
* @param grantResults
441+
* @see https://developer.android.com/reference/android/app/Activity#onRequestPermissionsResult(int,%20java.lang.String[],%20int[])
438442
*/
439443
public void onRequestPermissionsResult(int requestCode, String[] permissions,
440444
int[] grantResults) throws JSONException {

0 commit comments

Comments
 (0)