/**@class android.app.LocalActivityManager @extends java.lang.Object <p>Helper class for managing multiple running embedded activities in the same process. This class is not normally used directly, but rather created for you as part of the {@link android.app.ActivityGroup} implementation. @see ActivityGroup @deprecated Use the new {@link android.app.Fragment} and {@link android.app.FragmentManager} APIs instead; these are also available on older platforms through the Android compatibility package. */ var LocalActivityManager = { /**Start a new activity running in the group. Every activity you start must have a unique string ID associated with it -- this is used to keep track of the activity, so that if you later call startActivity() again on it the same activity object will be retained. <p>When there had previously been an activity started under this id, it may either be destroyed and a new one started, or the current one re-used, based on these conditions, in order:</p> <ul> <li> If the Intent maps to a different activity component than is currently running, the current activity is finished and a new one started. <li> If the current activity uses a non-multiple launch mode (such as singleTop), or the Intent has the {@link Intent#FLAG_ACTIVITY_SINGLE_TOP} flag set, then the current activity will remain running and its {@link android.app.Activity#onNewIntent(Intent) android.app.Activity.onNewIntent()} method called. <li> If the new Intent is the same (excluding extras) as the previous one, and the new Intent does not have the {@link Intent#FLAG_ACTIVITY_CLEAR_TOP} set, then the current activity will remain running as-is. <li> Otherwise, the current activity will be finished and a new one started. </ul> <p>If the given Intent can not be resolved to an available Activity, this method throws {@link android.content.ActivityNotFoundException}. <p>Warning: There is an issue where, if the Intent does not include an explicit component, we can restore the state for a different activity class than was previously running when the state was saved (if the set of available activities changes between those points). @param {String} id Unique identifier of the activity to be started @param {Object {Intent}} intent The Intent describing the activity to be started @return {Object {android.view.Window}} Returns the window of the activity. The caller needs to take care of adding this window to a view hierarchy, and likewise dealing with removing the old window if the activity has changed. @throws android.content.ActivityNotFoundException */ startActivity : function( ) {}, /**Destroy the activity associated with a particular id. This activity will go through the normal lifecycle events and fine onDestroy(), and then the id removed from the group. @param {String} id Unique identifier of the activity to be destroyed @param {Boolean} finish If true, this activity will be finished, so its id and all state are removed from the group. @return {Object {android.view.Window}} Returns the window that was used to display the activity, or null if there was none. */ destroyActivity : function( ) {}, /**Retrieve the Activity that is currently running. @return {Object {android.app.Activity}} the currently running (resumed) Activity, or null if there is not one @see #startActivity @see #getCurrentId */ getCurrentActivity : function( ) {}, /**Retrieve the ID of the activity that is currently running. @return {String} the ID of the currently running (resumed) Activity, or null if there is not one @see #startActivity @see #getCurrentActivity */ getCurrentId : function( ) {}, /**Return the Activity object associated with a string ID. @see #startActivity @return {Object {android.app.Activity}} the associated Activity object, or null if the id is unknown or its activity is not currently instantiated */ getActivity : function( ) {}, /**Restore a state that was previously returned by {@link #saveInstanceState}. This adds to the activity group information about all activity IDs that had previously been saved, even if they have not been started yet, so if the user later navigates to them the correct state will be restored. <p>Note: This does <b>not</b> change the current running activity, or start whatever activity was previously running when the state was saved. That is up to the client to do, in whatever way it thinks is best. @param {Object {Bundle}} state a previously saved state; does nothing if this is null @see #saveInstanceState */ dispatchCreate : function( ) {}, /**Retrieve the state of all activities known by the group. For activities that have previously run and are now stopped or finished, the last saved state is used. For the current running activity, its {@link android.app.Activity#onSaveInstanceState} is called to retrieve its current state. @return {Object {android.os.Bundle}} a Bundle holding the newly created state of all known activities @see #dispatchCreate */ saveInstanceState : function( ) {}, /**Called by the container activity in its {@link android.app.Activity#onResume} so that LocalActivityManager can perform the corresponding action on the activities it holds. @see Activity#onResume */ dispatchResume : function( ) {}, /**Called by the container activity in its {@link android.app.Activity#onPause} so that LocalActivityManager can perform the corresponding action on the activities it holds. @param {Boolean} finishing set to true if the parent activity has been finished; this can be determined by calling Activity.isFinishing() @see Activity#onPause @see Activity#isFinishing */ dispatchPause : function( ) {}, /**Called by the container activity in its {@link android.app.Activity#onStop} so that LocalActivityManager can perform the corresponding action on the activities it holds. @see Activity#onStop */ dispatchStop : function( ) {}, /**Call onRetainNonConfigurationInstance on each child activity and store the results in a HashMap by id. Only construct the HashMap if there is a non-null object to store. Note that this does not support nested ActivityGroups. {@hide} */ dispatchRetainNonConfigurationInstance : function( ) {}, /**Remove all activities from this LocalActivityManager, performing an {@link android.app.Activity#onDestroy} on any that are currently instantiated. */ removeAllActivities : function( ) {}, /**Called by the container activity in its {@link android.app.Activity#onDestroy} so that LocalActivityManager can perform the corresponding action on the activities it holds. @see Activity#onDestroy */ dispatchDestroy : function( ) {}, };