Loading services/core/java/com/android/server/wm/ConfigurationContainer.java +5 −0 Original line number Diff line number Diff line Loading @@ -544,6 +544,11 @@ public abstract class ConfigurationContainer<E extends ConfigurationContainer> { return getActivityType() == ACTIVITY_TYPE_RECENTS; } final boolean isActivityTypeHomeOrRecents() { final int activityType = getActivityType(); return activityType == ACTIVITY_TYPE_HOME || activityType == ACTIVITY_TYPE_RECENTS; } public boolean isActivityTypeAssistant() { return getActivityType() == ACTIVITY_TYPE_ASSISTANT; } Loading services/core/java/com/android/server/wm/DisplayContent.java +1 −1 Original line number Diff line number Diff line Loading @@ -4083,7 +4083,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp final boolean renewImeSurface = mImeScreenshot == null || mImeScreenshot.getWidth() != mInputMethodWindow.getFrame().width() || mImeScreenshot.getHeight() != mInputMethodWindow.getFrame().height(); if (task != null && !task.isHomeOrRecentsRootTask()) { if (task != null && !task.isActivityTypeHomeOrRecents()) { SurfaceControl.ScreenshotHardwareBuffer imeBuffer = renewImeSurface ? mWmService.mTaskSnapshotController.snapshotImeFromAttachedTask(task) : null; Loading services/core/java/com/android/server/wm/RecentTasks.java +3 −3 Original line number Diff line number Diff line Loading @@ -529,7 +529,7 @@ class RecentTasks { */ void notifyTaskPersisterLocked(Task task, boolean flush) { final Task rootTask = task != null ? task.getRootTask() : null; if (rootTask != null && rootTask.isHomeOrRecentsRootTask()) { if (rootTask != null && rootTask.isActivityTypeHomeOrRecents()) { // Never persist the home or recents task. return; } Loading Loading @@ -563,7 +563,7 @@ class RecentTasks { private static boolean shouldPersistTaskLocked(Task task) { final Task rootTask = task.getRootTask(); return task.isPersistable && (rootTask == null || !rootTask.isHomeOrRecentsRootTask()); return task.isPersistable && (rootTask == null || !rootTask.isActivityTypeHomeOrRecents()); } void onSystemReadyLocked() { Loading Loading @@ -994,7 +994,7 @@ class RecentTasks { } final Task rootTask = task.getRootTask(); if ((task.isPersistable || task.inRecents) && (rootTask == null || !rootTask.isHomeOrRecentsRootTask())) { && (rootTask == null || !rootTask.isActivityTypeHomeOrRecents())) { if (TaskPersister.DEBUG) Slog.d(TAG, "adding to persistentTaskIds task=" + task); persistentTaskIds.add(task.mTaskId); } else { Loading services/core/java/com/android/server/wm/RecentsAnimationController.java +1 −1 Original line number Diff line number Diff line Loading @@ -613,7 +613,7 @@ public class RecentsAnimationController implements DeathRecipient { final TaskFragment adjacentTask = task.getRootTask().getAdjacentTaskFragment(); final boolean inSplitScreen = task.getWindowingMode() == WINDOWING_MODE_MULTI_WINDOW && adjacentTask != null; if (task.isHomeOrRecentsRootTask() if (task.isActivityTypeHomeOrRecents() // Skip if the task is in split screen and in landscape. || (inSplitScreen && isDisplayLandscape) // Skip if the task is the top task in split screen. Loading services/core/java/com/android/server/wm/Task.java +3 −7 Original line number Diff line number Diff line Loading @@ -2711,7 +2711,7 @@ class Task extends TaskFragment { // they extend past their root task and sysui uses the root task surface to control // cropping. // TODO(b/158242495): get rid of this when drag/drop can use surface bounds. if (isActivityTypeHome() || isActivityTypeRecents()) { if (isActivityTypeHomeOrRecents()) { // Make sure this is the top-most non-organizer root task (if not top-most, it means // another translucent task could be above this, so this needs to stay cropped. final Task rootTask = getRootTask(); Loading Loading @@ -3306,7 +3306,7 @@ class Task extends TaskFragment { if (control != null) { // We let the transition to be controlled by RecentsAnimation, and callback task's // RemoteAnimationTarget for remote runner to animate. if (enter && !isHomeOrRecentsRootTask()) { if (enter && !isActivityTypeHomeOrRecents()) { ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS, "applyAnimationUnchecked, control: %s, task: %s, transit: %s", control, asTask(), AppTransition.appTransitionOldToString(transit)); Loading Loading @@ -4591,10 +4591,6 @@ class Task extends TaskFragment { !PRESERVE_WINDOWS); } final boolean isHomeOrRecentsRootTask() { return isActivityTypeHome() || isActivityTypeRecents(); } final boolean isOnHomeDisplay() { return getDisplayId() == DEFAULT_DISPLAY; } Loading Loading @@ -5044,7 +5040,7 @@ class Task extends TaskFragment { // The transition animation and starting window are not needed if {@code allowMoveToFront} // is false, because the activity won't be visible. if ((!isHomeOrRecentsRootTask() || hasActivity()) && allowMoveToFront) { if ((!isActivityTypeHomeOrRecents() || hasActivity()) && allowMoveToFront) { final DisplayContent dc = mDisplayContent; if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION, "Prepare open transition: starting " + r); Loading Loading
services/core/java/com/android/server/wm/ConfigurationContainer.java +5 −0 Original line number Diff line number Diff line Loading @@ -544,6 +544,11 @@ public abstract class ConfigurationContainer<E extends ConfigurationContainer> { return getActivityType() == ACTIVITY_TYPE_RECENTS; } final boolean isActivityTypeHomeOrRecents() { final int activityType = getActivityType(); return activityType == ACTIVITY_TYPE_HOME || activityType == ACTIVITY_TYPE_RECENTS; } public boolean isActivityTypeAssistant() { return getActivityType() == ACTIVITY_TYPE_ASSISTANT; } Loading
services/core/java/com/android/server/wm/DisplayContent.java +1 −1 Original line number Diff line number Diff line Loading @@ -4083,7 +4083,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp final boolean renewImeSurface = mImeScreenshot == null || mImeScreenshot.getWidth() != mInputMethodWindow.getFrame().width() || mImeScreenshot.getHeight() != mInputMethodWindow.getFrame().height(); if (task != null && !task.isHomeOrRecentsRootTask()) { if (task != null && !task.isActivityTypeHomeOrRecents()) { SurfaceControl.ScreenshotHardwareBuffer imeBuffer = renewImeSurface ? mWmService.mTaskSnapshotController.snapshotImeFromAttachedTask(task) : null; Loading
services/core/java/com/android/server/wm/RecentTasks.java +3 −3 Original line number Diff line number Diff line Loading @@ -529,7 +529,7 @@ class RecentTasks { */ void notifyTaskPersisterLocked(Task task, boolean flush) { final Task rootTask = task != null ? task.getRootTask() : null; if (rootTask != null && rootTask.isHomeOrRecentsRootTask()) { if (rootTask != null && rootTask.isActivityTypeHomeOrRecents()) { // Never persist the home or recents task. return; } Loading Loading @@ -563,7 +563,7 @@ class RecentTasks { private static boolean shouldPersistTaskLocked(Task task) { final Task rootTask = task.getRootTask(); return task.isPersistable && (rootTask == null || !rootTask.isHomeOrRecentsRootTask()); return task.isPersistable && (rootTask == null || !rootTask.isActivityTypeHomeOrRecents()); } void onSystemReadyLocked() { Loading Loading @@ -994,7 +994,7 @@ class RecentTasks { } final Task rootTask = task.getRootTask(); if ((task.isPersistable || task.inRecents) && (rootTask == null || !rootTask.isHomeOrRecentsRootTask())) { && (rootTask == null || !rootTask.isActivityTypeHomeOrRecents())) { if (TaskPersister.DEBUG) Slog.d(TAG, "adding to persistentTaskIds task=" + task); persistentTaskIds.add(task.mTaskId); } else { Loading
services/core/java/com/android/server/wm/RecentsAnimationController.java +1 −1 Original line number Diff line number Diff line Loading @@ -613,7 +613,7 @@ public class RecentsAnimationController implements DeathRecipient { final TaskFragment adjacentTask = task.getRootTask().getAdjacentTaskFragment(); final boolean inSplitScreen = task.getWindowingMode() == WINDOWING_MODE_MULTI_WINDOW && adjacentTask != null; if (task.isHomeOrRecentsRootTask() if (task.isActivityTypeHomeOrRecents() // Skip if the task is in split screen and in landscape. || (inSplitScreen && isDisplayLandscape) // Skip if the task is the top task in split screen. Loading
services/core/java/com/android/server/wm/Task.java +3 −7 Original line number Diff line number Diff line Loading @@ -2711,7 +2711,7 @@ class Task extends TaskFragment { // they extend past their root task and sysui uses the root task surface to control // cropping. // TODO(b/158242495): get rid of this when drag/drop can use surface bounds. if (isActivityTypeHome() || isActivityTypeRecents()) { if (isActivityTypeHomeOrRecents()) { // Make sure this is the top-most non-organizer root task (if not top-most, it means // another translucent task could be above this, so this needs to stay cropped. final Task rootTask = getRootTask(); Loading Loading @@ -3306,7 +3306,7 @@ class Task extends TaskFragment { if (control != null) { // We let the transition to be controlled by RecentsAnimation, and callback task's // RemoteAnimationTarget for remote runner to animate. if (enter && !isHomeOrRecentsRootTask()) { if (enter && !isActivityTypeHomeOrRecents()) { ProtoLog.d(WM_DEBUG_RECENTS_ANIMATIONS, "applyAnimationUnchecked, control: %s, task: %s, transit: %s", control, asTask(), AppTransition.appTransitionOldToString(transit)); Loading Loading @@ -4591,10 +4591,6 @@ class Task extends TaskFragment { !PRESERVE_WINDOWS); } final boolean isHomeOrRecentsRootTask() { return isActivityTypeHome() || isActivityTypeRecents(); } final boolean isOnHomeDisplay() { return getDisplayId() == DEFAULT_DISPLAY; } Loading Loading @@ -5044,7 +5040,7 @@ class Task extends TaskFragment { // The transition animation and starting window are not needed if {@code allowMoveToFront} // is false, because the activity won't be visible. if ((!isHomeOrRecentsRootTask() || hasActivity()) && allowMoveToFront) { if ((!isActivityTypeHomeOrRecents() || hasActivity()) && allowMoveToFront) { final DisplayContent dc = mDisplayContent; if (DEBUG_TRANSITION) Slog.v(TAG_TRANSITION, "Prepare open transition: starting " + r); Loading