Updated Branches: refs/heads/master 5ff900f7e -> 778b784eb
[CB-2908] Fix the DroidGap activity Lifecycle broken issue Attempting to invoke the Activity's finish() onDestroy breaks an Activity's lifecycle flag. OnDestroy can be called by the system, for instance, on restarting an Activity, it's definitely different from a normal finish(). Finish() incorrectly in onDestroy results in another DroidGap derived activity is started, while the original one is not yet onDestroy. This issue could be found when the system is trying to restart the activity upon, for instance, receiving immediately successive device Config changes. Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/778b784e Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/778b784e Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/778b784e Branch: refs/heads/master Commit: 778b784eb6f78a467d010dbfb2ecd2ee0b3ac3fc Parents: 5ff900f Author: HUANG Menghuai <[email protected]> Authored: Mon Apr 1 12:40:51 2013 +0800 Committer: Andrew Grieve <[email protected]> Committed: Thu Apr 4 16:47:03 2013 -0400 ---------------------------------------------------------------------- framework/src/org/apache/cordova/DroidGap.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-android/blob/778b784e/framework/src/org/apache/cordova/DroidGap.java ---------------------------------------------------------------------- diff --git a/framework/src/org/apache/cordova/DroidGap.java b/framework/src/org/apache/cordova/DroidGap.java index a9efc93..bb895e2 100755 --- a/framework/src/org/apache/cordova/DroidGap.java +++ b/framework/src/org/apache/cordova/DroidGap.java @@ -718,7 +718,7 @@ public class DroidGap extends Activity implements CordovaInterface { appView.handleDestroy(); } else { - this.endActivity(); + this.activityState = ACTIVITY_EXITING; } }
