cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HUANG Menghuai <linker.hu...@gmail.com>
Subject Fix the DroidGap activity Lifecycle broken issue onDestroy.
Date Tue, 02 Apr 2013 02:00:23 GMT
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:

   -
   http://developer.android.com/reference/android/app/Activity.html#ConfigurationChanges

Please check attached log snapshots of the issue.

https://github.com/apache/cordova-android/pull/42


------------------------------

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.

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message