cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From riknoll <...@git.apache.org>
Subject [GitHub] cordova-android pull request: CB-8917: Added pending plugin callba...
Date Wed, 11 Nov 2015 18:03:23 GMT
Github user riknoll commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/239#discussion_r44563854
  
    --- Diff: framework/src/org/apache/cordova/CordovaInterfaceImpl.java ---
    @@ -115,6 +115,10 @@ public boolean onActivityResult(int requestCode, int resultCode,
Intent intent)
                 savedResult = new ActivityResultHolder(requestCode, resultCode, intent);
                 if (pluginManager != null) {
                     callback = pluginManager.getPlugin(initCallbackService);
    +                if(callback != null) {
    +                    callback.onRestoreStateForActivityResult(savedPluginState.getBundle(callback.getServiceName()),
    --- End diff --
    
    I believe so. This will only be called after the Activity was destroyed in which case
`onSaveInstanceState()` will have been called and the `savedPluginState` bundle saved. I believe
Activity results are only delivered after `onCreate()` is called, so the Bundle will have
already been retrieved (but I can double check that). It is the responsibility of the plugin
to check if the bundle they receive is null.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message