Rework activity lifecycle so onSaveInstanceState() is after onPause().
The goal is to fix a bunch of fragment-related bugs caused by various things trying to do fragment transactions after onPause()... which currently throws an exception, since this is after the activity's state has been saved so the new fragment state can be lost. The basic change is relatively simple -- we now consider processes hosting paused or stopping activities to be unkillable, and the client code now does the onSaveInstanceState() as part of stopping the activity. For compatibility, if an app's targetSdkVersion is < HONEYCOMB, the client side will still call onSaveInstanceState() prior to onPause() and just hold on to that state until it needs to report it in once being stopped. Also included here is a change to generate thumbnails by taking screenshots. The code for generating thumbnails by re-rendering the view hierarchy is thus removed. Change-Id: Iac1191646bd3cadbfe65779297795f22edf7e74a
Loading
Please register or sign in to comment