Skip to content

onRequestPermissionResult deprecation issue #1388

Open
@jacobg

Description

@jacobg

onRequestPermissionResult is marked as deprecated in favor of onRequestPermissionsResult:

* @deprecated Use {@link #onRequestPermissionsResult} instead.
*/
@Deprecated
public void onRequestPermissionResult(int requestCode, String[] permissions,
int[] grantResults) throws JSONException {
}

However, CordovaInterfaceImpl calls the deprecated method instead of the new one:

public void onRequestPermissionResult(int requestCode, String[] permissions,
int[] grantResults) throws JSONException {
Pair<CordovaPlugin, Integer> callback = permissionResultCallbacks.getAndRemoveCallback(requestCode);
if(callback != null) {
callback.first.onRequestPermissionResult(callback.second, permissions, grantResults);
}
}

Maybe should CordovaPlugin's default implementation of onRequestPermissionResult call the new onRequestPermissionsResult method until onRequestPermissionResult is removed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions