You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2022/01/05 20:27:21 UTC

[GitHub] [cordova-android] jacobg opened a new issue #1388: onRequestPermissionResult deprecation issue

jacobg opened a new issue #1388:
URL: https://github.com/apache/cordova-android/issues/1388


   `onRequestPermissionResult` is marked as deprecated in favor of `onRequestPermissionsResult`:
   https://github.com/apache/cordova-android/blob/a1ed1c0af7c6267f47e580e8850295202692f4ea/framework/src/org/apache/cordova/CordovaPlugin.java#L418-L424
   
   However, `CordovaInterfaceImpl` calls the deprecated method instead of the new one:
   https://github.com/apache/cordova-android/blob/a1ed1c0af7c6267f47e580e8850295202692f4ea/framework/src/org/apache/cordova/CordovaInterfaceImpl.java#L218-L224
   
   Maybe should `CordovaPlugin`'s default implementation of `onRequestPermissionResult` call the new `onRequestPermissionsResult` method until  `onRequestPermissionResult` is removed?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] dpogue commented on issue #1388: onRequestPermissionResult deprecation issue

Posted by GitBox <gi...@apache.org>.
dpogue commented on issue #1388:
URL: https://github.com/apache/cordova-android/issues/1388#issuecomment-1006054937


   They are both called by the PermissionsHelper: https://github.com/apache/cordova-android/blob/a1ed1c0af7c6267f47e580e8850295202692f4ea/framework/src/org/apache/cordova/PermissionHelper.java#L76-L88
   
   We can't remove `onRequestPermissionResult` until the next major version because it will break existing plugins that haven't been updated to use `onRequestPermissionsResult`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] jacobg commented on issue #1388: onRequestPermissionResult deprecation issue

Posted by GitBox <gi...@apache.org>.
jacobg commented on issue #1388:
URL: https://github.com/apache/cordova-android/issues/1388#issuecomment-1006057233


   Where does `callback.first.onRequestPermissionResult` in `CordovaInterfaceImpl` call to?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] Chuckytuh commented on issue #1388: onRequestPermissionResult deprecation issue

Posted by GitBox <gi...@apache.org>.
Chuckytuh commented on issue #1388:
URL: https://github.com/apache/cordova-android/issues/1388#issuecomment-1029474414


   `CordovaInterfaceImpl` is directly calling the deprecated method `onRequestPermissionResult` but the deprecation annotation is pushing developers to override the new method that is never executed. 
   
   Also, does it make sense for the `PermissionHelper` to execute both the deprecated and the new methods? That seems like a source of bugs lurking around for plugins as it isn't explicit that both will be executed and mainly because `PermissionHelper` is to provide back compatibility with potentially legacy code.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org