Skip to content

Conversation

@huangmenghuai
Copy link
Contributor

This request is trying to fix the issue that a DroidGap derived Activity is restarted by the system in an incorrect order due to the finish() invocation onDestroy() upon say, device Config Changes*.

Upon device Config Changes, onDestroy is followed by a onCreate as promised in:

Please check attached log snapshots of the 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.


error

The corresponding device "Config Changes" notifications
error_configchanged

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.
@agrieve
Copy link
Contributor

agrieve commented Apr 4, 2013

Thanks for the detailed explanation! I've merged in your change and created a tracking issue for it:
https://issues.apache.org/jira/browse/CB-2908

Please close the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants