You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2015/03/27 15:15:56 UTC
[2/2] android commit: CB-8764 Store serviceName instead of class
(close #169)
CB-8764 Store serviceName instead of class (close #169)
Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/500ccd8e
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/500ccd8e
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/500ccd8e
Branch: refs/heads/master
Commit: 500ccd8e803fc731c41a8ad2ba488e4ccb8635ec
Parents: 7cf7311
Author: Serge Huijben <s....@gmail.com>
Authored: Fri Mar 27 12:52:11 2015 +0100
Committer: Andrew Grieve <ag...@chromium.org>
Committed: Fri Mar 27 10:15:48 2015 -0400
----------------------------------------------------------------------
.../src/org/apache/cordova/CordovaInterfaceImpl.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-android/blob/500ccd8e/framework/src/org/apache/cordova/CordovaInterfaceImpl.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaInterfaceImpl.java b/framework/src/org/apache/cordova/CordovaInterfaceImpl.java
index a693764..2dc6b3d 100644
--- a/framework/src/org/apache/cordova/CordovaInterfaceImpl.java
+++ b/framework/src/org/apache/cordova/CordovaInterfaceImpl.java
@@ -18,7 +18,7 @@ public class CordovaInterfaceImpl implements CordovaInterface {
protected PluginManager pluginManager;
protected CordovaPlugin activityResultCallback;
- protected String initCallbackClass;
+ protected String initCallbackService;
protected int activityResultRequestCode;
public CordovaInterfaceImpl(Activity activity) {
@@ -77,12 +77,12 @@ public class CordovaInterfaceImpl implements CordovaInterface {
*/
public boolean onActivityResult(int requestCode, int resultCode, Intent intent) {
CordovaPlugin callback = activityResultCallback;
- if(callback == null && initCallbackClass != null) {
+ if(callback == null && initCallbackService != null) {
// The application was restarted, but had defined an initial callback
// before being shut down.
- callback = pluginManager.getPlugin(initCallbackClass);
+ callback = pluginManager.getPlugin(initCallbackService);
}
- initCallbackClass = null;
+ initCallbackService = null;
activityResultCallback = null;
if (callback != null) {
@@ -108,8 +108,8 @@ public class CordovaInterfaceImpl implements CordovaInterface {
*/
public void onSaveInstanceState(Bundle outState) {
if (activityResultCallback != null) {
- String cClass = activityResultCallback.getClass().getName();
- outState.putString("callbackClass", cClass);
+ String serviceName = activityResultCallback.getServiceName();
+ outState.putString("callbackService", serviceName);
}
}
@@ -117,6 +117,6 @@ public class CordovaInterfaceImpl implements CordovaInterface {
* Call this from onCreate() so that any saved startActivityForResult parameters will be restored.
*/
public void restoreInstanceState(Bundle savedInstanceState) {
- initCallbackClass = savedInstanceState.getString("callbackClass");
+ initCallbackService = savedInstanceState.getString("callbackService");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org