On Apr 28, 12:21 am, Dianne Hackborn <hack...@android.com> wrote: > "Asking it to finish" means finishing the activity, which means destroying > it. Politely asking it to finish isn't going to cause it to just not > cleanly exit. It would be fundamentally broken if activities every just > stop being used in their process without actually going through the > lifecycle. > > In other words "asking to finish" -> Activity.finish() -> does what you > expect.
Ok, so when I 'finish' an Activity programmatically, never wanting it to show up in the Task stack again, how does the system know to remove my Activity from the back stack in that case, but it doesn't remove it from the stack when the system asks it to finish due to low memory conditions? Also, the documentation for onDestroy() adds to the confusion a bit: "Called before the activity is destroyed. This is the final call that the activity will receive. It could be called either because the activity is finishing (someone called finish() on it), or because the system is temporarily destroying this instance of the activity to save space. You can distinguish between these two scenarios with the isFinishing() method." Note that it says if the Activity is being temporarily discarded to save space, then the 'isFinishing' method will return false. If Android is simply calling 'finish' to temporarily discard the Activity, as you state, then is it explicitly setting 'isFinishing()' flag back to false (assuming the call to finish() automatically sets it to true; because if it didn't, then when I programmatically call 'finish()' to permanently finish the Activity, the flag would probably never get set)? - Eric -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en