Loading core/java/android/view/IApplicationToken.aidl +0 −5 Original line number Diff line number Diff line Loading @@ -20,10 +20,5 @@ package android.view; /** {@hide} */ interface IApplicationToken { void windowsDrawn(); void windowsVisible(); void windowsGone(); boolean keyDispatchingTimedOut(String reason); long getKeyDispatchingTimeout(); } core/java/android/view/IWindowManager.aidl +0 −55 Original line number Diff line number Diff line Loading @@ -83,41 +83,9 @@ interface IWindowManager void setOverscan(int displayId, int left, int top, int right, int bottom); // These can only be called when holding the MANAGE_APP_TOKENS permission. void pauseKeyDispatching(IBinder token); void resumeKeyDispatching(IBinder token); void setEventDispatching(boolean enabled); void addWindowToken(IBinder token, int type, int displayId); void removeWindowToken(IBinder token, int displayId); /** * Creates the object representation for the application token in the window manager and adds it * to the specified task Id. * * @param addPos The position to add the token to in the task. * @param token The token to add. * @param taskId The Id of the task we are adding the token to. * @param requestedOrientation Orientation to use. * @param fullscreen True if the application token is fullscreen. * @param showWhenLocked True if the application token should be shown when locked. * @param configChanges Input configuration changes. * @param voiceInteraction True if the token is in voice interaction mode. * @param launchTaskBehind True if the token is been launched from behind. * @param alwaysFocusable True if the app windows are always focusable regardless of the stack * they are in. * @param targetSdkVersion The application's target SDK version */ void addAppToken(int addPos, IApplicationToken token, int taskId, int requestedOrientation, boolean fullscreen, boolean showWhenLocked, int configChanges, boolean voiceInteraction, boolean launchTaskBehind, boolean alwaysFocusable, int targetSdkVersion, int rotationAnimationHint); /** * Adds an already existing application token on the window manager side to the input task id. * * @param token The token we are adding to the input task Id. * @param taskId The Id of the task we are adding the token to. */ void addAppToTask(IBinder token, int taskId); void setAppOrientation(IApplicationToken token, int requestedOrientation); int getAppOrientation(IApplicationToken token); void setFocusedApp(IBinder token, boolean moveFocusNow); void prepareAppTransition(int transit, boolean alwaysKeepCurrent); int getPendingAppTransition(); Loading Loading @@ -154,20 +122,6 @@ interface IWindowManager boolean scaleUp); void executeAppTransition(); /** * Called to set the starting window for the input token and returns true if the starting * window was set for the token. */ boolean setAppStartingWindow(IBinder token, String pkg, int theme, in CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, int icon, int logo, int windowFlags, IBinder transferFrom, boolean createIfNeeded); void setAppVisibility(IBinder token, boolean visible); void notifyAppResumed(IBinder token, boolean wasStopped, boolean allowSavedSurface); void notifyAppStopped(IBinder token); void startAppFreezingScreen(IBinder token, int configChanges); void stopAppFreezingScreen(IBinder token, boolean force); void removeAppToken(IBinder token, int displayId); /** Used by system ui to report that recents has shown itself. */ void endProlongedAnimations(); Loading Loading @@ -314,15 +268,6 @@ interface IWindowManager */ boolean requestAssistScreenshot(IAssistScreenshotReceiver receiver); /** * Create a screenshot of the applications currently displayed. * * @param frameScale the scale to apply to the frame, only used when width = -1 and * height = -1 */ Bitmap screenshotApplications(IBinder appToken, int displayId, int maxWidth, int maxHeight, float frameScale); /** * Called by the status bar to notify Views of changes to System UI visiblity. */ Loading services/core/java/com/android/server/am/ActivityManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -4749,7 +4749,7 @@ public class ActivityManagerService extends IActivityManager.Stub if (r == null) { return ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; } return mWindowManager.getAppOrientation(r.appToken); return r.getRequestedOrientation(); } } Loading services/core/java/com/android/server/am/ActivityRecord.java +230 −219 File changed.Preview size limit exceeded, changes collapsed. Show changes services/core/java/com/android/server/am/ActivityStack.java +16 −56 Original line number Diff line number Diff line Loading @@ -61,8 +61,6 @@ import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM; import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME; import static com.android.server.am.ActivityRecord.APPLICATION_ACTIVITY_TYPE; import static com.android.server.am.ActivityRecord.HOME_ACTIVITY_TYPE; import static com.android.server.am.ActivityRecord.STARTING_WINDOW_REMOVED; import static com.android.server.am.ActivityRecord.STARTING_WINDOW_SHOWN; import static com.android.server.am.ActivityStackSupervisor.FindTaskResult; import static com.android.server.am.ActivityStackSupervisor.ON_TOP; import static com.android.server.am.ActivityStackSupervisor.PRESERVE_WINDOWS; Loading Loading @@ -2046,15 +2044,7 @@ final class ActivityStack extends ConfigurationContainer { continue; } if (r.state == ActivityState.INITIALIZING && r.mStartingWindowState == STARTING_WINDOW_SHOWN && behindFullscreenActivity) { if (DEBUG_VISIBILITY) Slog.w(TAG_VISIBILITY, "Found orphaned starting window " + r); r.mStartingWindowState = STARTING_WINDOW_REMOVED; mWindowManager.removeAppStartingWindow(r.appToken); } r.removeOrphanedStartingWindow(behindFullscreenActivity); behindFullscreenActivity |= r.fullscreen; } } Loading Loading @@ -2287,7 +2277,7 @@ final class ActivityStack extends ConfigurationContainer { // previous should actually be hidden depending on whether the // new one is found to be full-screen or not. if (prev.finishing) { mWindowManager.setAppVisibility(prev.appToken, false); prev.setVisibility(false); if (DEBUG_SWITCH) Slog.v(TAG_SWITCH, "Not waiting for visible to hide: " + prev + ", waitingVisible=" + mStackSupervisor.mWaitingVisibleActivities.contains(prev) Loading Loading @@ -2329,7 +2319,7 @@ final class ActivityStack extends ConfigurationContainer { ? TRANSIT_ACTIVITY_CLOSE : TRANSIT_TASK_CLOSE, false); } mWindowManager.setAppVisibility(prev.appToken, false); prev.setVisibility(false); } else { if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION, "Prepare open transition: prev=" + prev); Loading Loading @@ -2384,7 +2374,7 @@ final class ActivityStack extends ConfigurationContainer { // This activity is now becoming visible. if (!next.visible || next.stopped || lastActivityTranslucent) { mWindowManager.setAppVisibility(next.appToken, true); next.setVisibility(true); } // schedule launch ticks to collect information about slow apps. Loading Loading @@ -2433,7 +2423,7 @@ final class ActivityStack extends ConfigurationContainer { mStackSupervisor.scheduleResumeTopActivities(); } if (!next.visible || next.stopped) { mWindowManager.setAppVisibility(next.appToken, true); next.setVisibility(true); } next.completeResumeLocked(); if (DEBUG_STACK) mStackSupervisor.validateTopActivitiesLocked(); Loading Loading @@ -2471,7 +2461,7 @@ final class ActivityStack extends ConfigurationContainer { // Well the app will no longer be stopped. // Clear app token stopped state in window manager if needed. mWindowManager.notifyAppResumed(next.appToken, next.stopped, allowSavedSurface); next.notifyAppResumed(next.stopped, allowSavedSurface); EventLog.writeEvent(EventLogTags.AM_RESUME_ACTIVITY, next.userId, System.identityHashCode(next), next.task.taskId, next.shortComponentName); Loading Loading @@ -2669,9 +2659,7 @@ final class ActivityStack extends ConfigurationContainer { if (!startIt) { if (DEBUG_ADD_REMOVE) Slog.i(TAG, "Adding activity " + r + " to task " + task, new RuntimeException("here").fillInStackTrace()); task.addActivityToTop(r); r.putInHistory(); addConfigOverride(r, task); r.createWindowContainer(); ActivityOptions.abort(options); return; } Loading @@ -2682,12 +2670,10 @@ final class ActivityStack extends ConfigurationContainer { } } // Place a new activity at top of stack, so it is next to interact // with the user. // Place a new activity at top of stack, so it is next to interact with the user. // If we are not placing the new activity frontmost, we do not want // to deliver the onUserLeaving callback to the actual frontmost // activity // If we are not placing the new activity frontmost, we do not want to deliver the // onUserLeaving callback to the actual frontmost activity if (task == r.task && mTaskHistory.indexOf(task) != (mTaskHistory.size() - 1)) { mStackSupervisor.mUserLeaving = false; if (DEBUG_USER_LEAVING) Slog.v(TAG_USER_LEAVING, Loading @@ -2699,10 +2685,9 @@ final class ActivityStack extends ConfigurationContainer { // Slot the activity into the history stack and proceed if (DEBUG_ADD_REMOVE) Slog.i(TAG, "Adding activity " + r + " to stack to task " + task, new RuntimeException("here").fillInStackTrace()); task.addActivityToTop(r); r.createWindowContainer(); task.setFrontOfTask(); r.putInHistory(); if (!isHomeOrRecentsStack() || numActivities() > 0) { // We want to show the starting preview window if we are // switching to a new task, or the next activity's process is Loading Loading @@ -2737,7 +2722,6 @@ final class ActivityStack extends ConfigurationContainer { mWindowManager.prepareAppTransition(transit, keepCurTransition); mNoAnimActivities.remove(r); } addConfigOverride(r, task); boolean doShow = true; if (newTask) { // Even though this activity is starting fresh, we still need Loading @@ -2756,7 +2740,7 @@ final class ActivityStack extends ConfigurationContainer { if (r.mLaunchTaskBehind) { // Don't do a starting window for mLaunchTaskBehind. More importantly make sure we // tell WindowManager that r is visible even though it is at the back of the stack. mWindowManager.setAppVisibility(r.appToken, true); r.setVisibility(true); ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS); } else if (SHOW_APP_STARTING_PREVIEW && doShow) { // Figure out if we are transitioning from another activity that is Loading @@ -2780,7 +2764,6 @@ final class ActivityStack extends ConfigurationContainer { } else { // If this is the first activity, don't do any fancy animations, // because there is nothing for it to animate on top of. addConfigOverride(r, task); ActivityOptions.abort(options); } } Loading Loading @@ -2865,8 +2848,6 @@ final class ActivityStack extends ConfigurationContainer { + " out to new task " + target.task); } setAppTask(target, targetTask); boolean noOptions = canMoveOptions; final int start = replyChainEnd < 0 ? i : replyChainEnd; for (int srcPos = start; srcPos >= i; --srcPos) { Loading @@ -2889,8 +2870,6 @@ final class ActivityStack extends ConfigurationContainer { "Pushing next activity " + p + " out to target's task " + target.task); p.setTask(targetTask, null); targetTask.addActivityAtBottom(p); setAppTask(p, targetTask); } mWindowManager.moveTaskToBottom(targetTask.taskId); Loading Loading @@ -3028,7 +3007,6 @@ final class ActivityStack extends ConfigurationContainer { + " callers=" + Debug.getCallers(3)); if (DEBUG_TASKS) Slog.v(TAG_TASKS, "Pulling activity " + p + " from " + srcPos + " in to resetting task " + task); setAppTask(p, task); } mWindowManager.moveTaskToTop(taskId); Loading Loading @@ -3223,7 +3201,7 @@ final class ActivityStack extends ConfigurationContainer { if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Stopping visible=" + r.visible + " for " + r); if (!r.visible) { mWindowManager.setAppVisibility(r.appToken, false); r.setVisibility(false); } EventLogTags.writeAmStopActivity( r.userId, System.identityHashCode(r), r.shortComponentName); Loading Loading @@ -3457,7 +3435,7 @@ final class ActivityStack extends ConfigurationContainer { mWindowManager.prepareAppTransition(transit, false); // Tell window manager to prepare for this one to be removed. mWindowManager.setAppVisibility(r.appToken, false); r.setVisibility(false); if (mPausingActivity == null) { if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Finish needs to pause: " + r); Loading @@ -3475,7 +3453,7 @@ final class ActivityStack extends ConfigurationContainer { if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Finish not pausing: " + r); if (r.visible) { mWindowManager.prepareAppTransition(transit, false); mWindowManager.setAppVisibility(r.appToken, false); r.setVisibility(false); mWindowManager.executeAppTransition(); if (!mStackSupervisor.mWaitingVisibleActivities.contains(r)) { mStackSupervisor.mWaitingVisibleActivities.add(r); Loading Loading @@ -3782,7 +3760,7 @@ final class ActivityStack extends ConfigurationContainer { r.state = ActivityState.DESTROYED; if (DEBUG_APP) Slog.v(TAG_APP, "Clearing app during remove for activity " + r); r.app = null; mWindowManager.removeAppToken(r.appToken, r.getDisplayId()); r.removeWindowContainer(); final TaskRecord task = r.task; if (task != null && task.removeActivity(r)) { if (DEBUG_STACK) Slog.i(TAG_STACK, Loading Loading @@ -4981,17 +4959,6 @@ final class ActivityStack extends ConfigurationContainer { } } void addConfigOverride(ActivityRecord r, TaskRecord task) { task.updateOverrideConfigurationFromLaunchBounds(); // TODO: VI deal with activity mWindowManager.addAppToken(task.mActivities.indexOf(r), r.appToken, r.task.taskId, r.info.screenOrientation, r.fullscreen, (r.info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0, r.info.configChanges, task.voiceSession != null, r.mLaunchTaskBehind, r.isAlwaysFocusable(), r.appInfo.targetSdkVersion, r.mRotationAnimationHint); r.onOverrideConfigurationSent(); } void moveToFrontAndResumeStateIfNeeded( ActivityRecord r, boolean moveToFront, boolean setResume, String reason) { if (!moveToFront) { Loading Loading @@ -5030,7 +4997,6 @@ final class ActivityStack extends ConfigurationContainer { r.info, r.intent, null, null, true, r.mActivityType); r.setTask(task, null); task.addActivityToTop(r); setAppTask(r, task); mStackSupervisor.scheduleReportPictureInPictureModeChangedIfNeeded(task, prevStack); moveToFrontAndResumeStateIfNeeded(r, wasFocused, wasResumed, "moveActivityToStack"); if (wasResumed) { Loading @@ -5038,12 +5004,6 @@ final class ActivityStack extends ConfigurationContainer { } } private void setAppTask(ActivityRecord r, TaskRecord task) { task.updateOverrideConfigurationFromLaunchBounds(); mWindowManager.addAppToTask(r.appToken, task.taskId); r.onOverrideConfigurationSent(); } public int getStackId() { return mStackId; } Loading Loading
core/java/android/view/IApplicationToken.aidl +0 −5 Original line number Diff line number Diff line Loading @@ -20,10 +20,5 @@ package android.view; /** {@hide} */ interface IApplicationToken { void windowsDrawn(); void windowsVisible(); void windowsGone(); boolean keyDispatchingTimedOut(String reason); long getKeyDispatchingTimeout(); }
core/java/android/view/IWindowManager.aidl +0 −55 Original line number Diff line number Diff line Loading @@ -83,41 +83,9 @@ interface IWindowManager void setOverscan(int displayId, int left, int top, int right, int bottom); // These can only be called when holding the MANAGE_APP_TOKENS permission. void pauseKeyDispatching(IBinder token); void resumeKeyDispatching(IBinder token); void setEventDispatching(boolean enabled); void addWindowToken(IBinder token, int type, int displayId); void removeWindowToken(IBinder token, int displayId); /** * Creates the object representation for the application token in the window manager and adds it * to the specified task Id. * * @param addPos The position to add the token to in the task. * @param token The token to add. * @param taskId The Id of the task we are adding the token to. * @param requestedOrientation Orientation to use. * @param fullscreen True if the application token is fullscreen. * @param showWhenLocked True if the application token should be shown when locked. * @param configChanges Input configuration changes. * @param voiceInteraction True if the token is in voice interaction mode. * @param launchTaskBehind True if the token is been launched from behind. * @param alwaysFocusable True if the app windows are always focusable regardless of the stack * they are in. * @param targetSdkVersion The application's target SDK version */ void addAppToken(int addPos, IApplicationToken token, int taskId, int requestedOrientation, boolean fullscreen, boolean showWhenLocked, int configChanges, boolean voiceInteraction, boolean launchTaskBehind, boolean alwaysFocusable, int targetSdkVersion, int rotationAnimationHint); /** * Adds an already existing application token on the window manager side to the input task id. * * @param token The token we are adding to the input task Id. * @param taskId The Id of the task we are adding the token to. */ void addAppToTask(IBinder token, int taskId); void setAppOrientation(IApplicationToken token, int requestedOrientation); int getAppOrientation(IApplicationToken token); void setFocusedApp(IBinder token, boolean moveFocusNow); void prepareAppTransition(int transit, boolean alwaysKeepCurrent); int getPendingAppTransition(); Loading Loading @@ -154,20 +122,6 @@ interface IWindowManager boolean scaleUp); void executeAppTransition(); /** * Called to set the starting window for the input token and returns true if the starting * window was set for the token. */ boolean setAppStartingWindow(IBinder token, String pkg, int theme, in CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, int icon, int logo, int windowFlags, IBinder transferFrom, boolean createIfNeeded); void setAppVisibility(IBinder token, boolean visible); void notifyAppResumed(IBinder token, boolean wasStopped, boolean allowSavedSurface); void notifyAppStopped(IBinder token); void startAppFreezingScreen(IBinder token, int configChanges); void stopAppFreezingScreen(IBinder token, boolean force); void removeAppToken(IBinder token, int displayId); /** Used by system ui to report that recents has shown itself. */ void endProlongedAnimations(); Loading Loading @@ -314,15 +268,6 @@ interface IWindowManager */ boolean requestAssistScreenshot(IAssistScreenshotReceiver receiver); /** * Create a screenshot of the applications currently displayed. * * @param frameScale the scale to apply to the frame, only used when width = -1 and * height = -1 */ Bitmap screenshotApplications(IBinder appToken, int displayId, int maxWidth, int maxHeight, float frameScale); /** * Called by the status bar to notify Views of changes to System UI visiblity. */ Loading
services/core/java/com/android/server/am/ActivityManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -4749,7 +4749,7 @@ public class ActivityManagerService extends IActivityManager.Stub if (r == null) { return ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; } return mWindowManager.getAppOrientation(r.appToken); return r.getRequestedOrientation(); } } Loading
services/core/java/com/android/server/am/ActivityRecord.java +230 −219 File changed.Preview size limit exceeded, changes collapsed. Show changes
services/core/java/com/android/server/am/ActivityStack.java +16 −56 Original line number Diff line number Diff line Loading @@ -61,8 +61,6 @@ import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM; import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME; import static com.android.server.am.ActivityRecord.APPLICATION_ACTIVITY_TYPE; import static com.android.server.am.ActivityRecord.HOME_ACTIVITY_TYPE; import static com.android.server.am.ActivityRecord.STARTING_WINDOW_REMOVED; import static com.android.server.am.ActivityRecord.STARTING_WINDOW_SHOWN; import static com.android.server.am.ActivityStackSupervisor.FindTaskResult; import static com.android.server.am.ActivityStackSupervisor.ON_TOP; import static com.android.server.am.ActivityStackSupervisor.PRESERVE_WINDOWS; Loading Loading @@ -2046,15 +2044,7 @@ final class ActivityStack extends ConfigurationContainer { continue; } if (r.state == ActivityState.INITIALIZING && r.mStartingWindowState == STARTING_WINDOW_SHOWN && behindFullscreenActivity) { if (DEBUG_VISIBILITY) Slog.w(TAG_VISIBILITY, "Found orphaned starting window " + r); r.mStartingWindowState = STARTING_WINDOW_REMOVED; mWindowManager.removeAppStartingWindow(r.appToken); } r.removeOrphanedStartingWindow(behindFullscreenActivity); behindFullscreenActivity |= r.fullscreen; } } Loading Loading @@ -2287,7 +2277,7 @@ final class ActivityStack extends ConfigurationContainer { // previous should actually be hidden depending on whether the // new one is found to be full-screen or not. if (prev.finishing) { mWindowManager.setAppVisibility(prev.appToken, false); prev.setVisibility(false); if (DEBUG_SWITCH) Slog.v(TAG_SWITCH, "Not waiting for visible to hide: " + prev + ", waitingVisible=" + mStackSupervisor.mWaitingVisibleActivities.contains(prev) Loading Loading @@ -2329,7 +2319,7 @@ final class ActivityStack extends ConfigurationContainer { ? TRANSIT_ACTIVITY_CLOSE : TRANSIT_TASK_CLOSE, false); } mWindowManager.setAppVisibility(prev.appToken, false); prev.setVisibility(false); } else { if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION, "Prepare open transition: prev=" + prev); Loading Loading @@ -2384,7 +2374,7 @@ final class ActivityStack extends ConfigurationContainer { // This activity is now becoming visible. if (!next.visible || next.stopped || lastActivityTranslucent) { mWindowManager.setAppVisibility(next.appToken, true); next.setVisibility(true); } // schedule launch ticks to collect information about slow apps. Loading Loading @@ -2433,7 +2423,7 @@ final class ActivityStack extends ConfigurationContainer { mStackSupervisor.scheduleResumeTopActivities(); } if (!next.visible || next.stopped) { mWindowManager.setAppVisibility(next.appToken, true); next.setVisibility(true); } next.completeResumeLocked(); if (DEBUG_STACK) mStackSupervisor.validateTopActivitiesLocked(); Loading Loading @@ -2471,7 +2461,7 @@ final class ActivityStack extends ConfigurationContainer { // Well the app will no longer be stopped. // Clear app token stopped state in window manager if needed. mWindowManager.notifyAppResumed(next.appToken, next.stopped, allowSavedSurface); next.notifyAppResumed(next.stopped, allowSavedSurface); EventLog.writeEvent(EventLogTags.AM_RESUME_ACTIVITY, next.userId, System.identityHashCode(next), next.task.taskId, next.shortComponentName); Loading Loading @@ -2669,9 +2659,7 @@ final class ActivityStack extends ConfigurationContainer { if (!startIt) { if (DEBUG_ADD_REMOVE) Slog.i(TAG, "Adding activity " + r + " to task " + task, new RuntimeException("here").fillInStackTrace()); task.addActivityToTop(r); r.putInHistory(); addConfigOverride(r, task); r.createWindowContainer(); ActivityOptions.abort(options); return; } Loading @@ -2682,12 +2670,10 @@ final class ActivityStack extends ConfigurationContainer { } } // Place a new activity at top of stack, so it is next to interact // with the user. // Place a new activity at top of stack, so it is next to interact with the user. // If we are not placing the new activity frontmost, we do not want // to deliver the onUserLeaving callback to the actual frontmost // activity // If we are not placing the new activity frontmost, we do not want to deliver the // onUserLeaving callback to the actual frontmost activity if (task == r.task && mTaskHistory.indexOf(task) != (mTaskHistory.size() - 1)) { mStackSupervisor.mUserLeaving = false; if (DEBUG_USER_LEAVING) Slog.v(TAG_USER_LEAVING, Loading @@ -2699,10 +2685,9 @@ final class ActivityStack extends ConfigurationContainer { // Slot the activity into the history stack and proceed if (DEBUG_ADD_REMOVE) Slog.i(TAG, "Adding activity " + r + " to stack to task " + task, new RuntimeException("here").fillInStackTrace()); task.addActivityToTop(r); r.createWindowContainer(); task.setFrontOfTask(); r.putInHistory(); if (!isHomeOrRecentsStack() || numActivities() > 0) { // We want to show the starting preview window if we are // switching to a new task, or the next activity's process is Loading Loading @@ -2737,7 +2722,6 @@ final class ActivityStack extends ConfigurationContainer { mWindowManager.prepareAppTransition(transit, keepCurTransition); mNoAnimActivities.remove(r); } addConfigOverride(r, task); boolean doShow = true; if (newTask) { // Even though this activity is starting fresh, we still need Loading @@ -2756,7 +2740,7 @@ final class ActivityStack extends ConfigurationContainer { if (r.mLaunchTaskBehind) { // Don't do a starting window for mLaunchTaskBehind. More importantly make sure we // tell WindowManager that r is visible even though it is at the back of the stack. mWindowManager.setAppVisibility(r.appToken, true); r.setVisibility(true); ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS); } else if (SHOW_APP_STARTING_PREVIEW && doShow) { // Figure out if we are transitioning from another activity that is Loading @@ -2780,7 +2764,6 @@ final class ActivityStack extends ConfigurationContainer { } else { // If this is the first activity, don't do any fancy animations, // because there is nothing for it to animate on top of. addConfigOverride(r, task); ActivityOptions.abort(options); } } Loading Loading @@ -2865,8 +2848,6 @@ final class ActivityStack extends ConfigurationContainer { + " out to new task " + target.task); } setAppTask(target, targetTask); boolean noOptions = canMoveOptions; final int start = replyChainEnd < 0 ? i : replyChainEnd; for (int srcPos = start; srcPos >= i; --srcPos) { Loading @@ -2889,8 +2870,6 @@ final class ActivityStack extends ConfigurationContainer { "Pushing next activity " + p + " out to target's task " + target.task); p.setTask(targetTask, null); targetTask.addActivityAtBottom(p); setAppTask(p, targetTask); } mWindowManager.moveTaskToBottom(targetTask.taskId); Loading Loading @@ -3028,7 +3007,6 @@ final class ActivityStack extends ConfigurationContainer { + " callers=" + Debug.getCallers(3)); if (DEBUG_TASKS) Slog.v(TAG_TASKS, "Pulling activity " + p + " from " + srcPos + " in to resetting task " + task); setAppTask(p, task); } mWindowManager.moveTaskToTop(taskId); Loading Loading @@ -3223,7 +3201,7 @@ final class ActivityStack extends ConfigurationContainer { if (DEBUG_VISIBILITY) Slog.v(TAG_VISIBILITY, "Stopping visible=" + r.visible + " for " + r); if (!r.visible) { mWindowManager.setAppVisibility(r.appToken, false); r.setVisibility(false); } EventLogTags.writeAmStopActivity( r.userId, System.identityHashCode(r), r.shortComponentName); Loading Loading @@ -3457,7 +3435,7 @@ final class ActivityStack extends ConfigurationContainer { mWindowManager.prepareAppTransition(transit, false); // Tell window manager to prepare for this one to be removed. mWindowManager.setAppVisibility(r.appToken, false); r.setVisibility(false); if (mPausingActivity == null) { if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Finish needs to pause: " + r); Loading @@ -3475,7 +3453,7 @@ final class ActivityStack extends ConfigurationContainer { if (DEBUG_PAUSE) Slog.v(TAG_PAUSE, "Finish not pausing: " + r); if (r.visible) { mWindowManager.prepareAppTransition(transit, false); mWindowManager.setAppVisibility(r.appToken, false); r.setVisibility(false); mWindowManager.executeAppTransition(); if (!mStackSupervisor.mWaitingVisibleActivities.contains(r)) { mStackSupervisor.mWaitingVisibleActivities.add(r); Loading Loading @@ -3782,7 +3760,7 @@ final class ActivityStack extends ConfigurationContainer { r.state = ActivityState.DESTROYED; if (DEBUG_APP) Slog.v(TAG_APP, "Clearing app during remove for activity " + r); r.app = null; mWindowManager.removeAppToken(r.appToken, r.getDisplayId()); r.removeWindowContainer(); final TaskRecord task = r.task; if (task != null && task.removeActivity(r)) { if (DEBUG_STACK) Slog.i(TAG_STACK, Loading Loading @@ -4981,17 +4959,6 @@ final class ActivityStack extends ConfigurationContainer { } } void addConfigOverride(ActivityRecord r, TaskRecord task) { task.updateOverrideConfigurationFromLaunchBounds(); // TODO: VI deal with activity mWindowManager.addAppToken(task.mActivities.indexOf(r), r.appToken, r.task.taskId, r.info.screenOrientation, r.fullscreen, (r.info.flags & FLAG_SHOW_FOR_ALL_USERS) != 0, r.info.configChanges, task.voiceSession != null, r.mLaunchTaskBehind, r.isAlwaysFocusable(), r.appInfo.targetSdkVersion, r.mRotationAnimationHint); r.onOverrideConfigurationSent(); } void moveToFrontAndResumeStateIfNeeded( ActivityRecord r, boolean moveToFront, boolean setResume, String reason) { if (!moveToFront) { Loading Loading @@ -5030,7 +4997,6 @@ final class ActivityStack extends ConfigurationContainer { r.info, r.intent, null, null, true, r.mActivityType); r.setTask(task, null); task.addActivityToTop(r); setAppTask(r, task); mStackSupervisor.scheduleReportPictureInPictureModeChangedIfNeeded(task, prevStack); moveToFrontAndResumeStateIfNeeded(r, wasFocused, wasResumed, "moveActivityToStack"); if (wasResumed) { Loading @@ -5038,12 +5004,6 @@ final class ActivityStack extends ConfigurationContainer { } } private void setAppTask(ActivityRecord r, TaskRecord task) { task.updateOverrideConfigurationFromLaunchBounds(); mWindowManager.addAppToTask(r.appToken, task.taskId); r.onOverrideConfigurationSent(); } public int getStackId() { return mStackId; } Loading