Loading core/java/android/app/TaskInfo.java +11 −7 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.app; import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.TestApi; Loading Loading @@ -170,6 +168,14 @@ public class TaskInfo { @Nullable public ActivityInfo topActivityInfo; /** * Whether this task is resizable. Unlike {@link #resizeMode} (which is what the top activity * supports), this is what the system actually uses for resizability based on other policy and * developer options. * @hide */ public boolean isResizeable; TaskInfo() { // Do nothing } Loading @@ -192,11 +198,6 @@ public class TaskInfo { } } /** @hide */ public boolean isResizable() { return resizeMode != RESIZE_MODE_UNRESIZEABLE; } /** @hide */ @NonNull @TestApi Loading Loading @@ -245,6 +246,7 @@ public class TaskInfo { topActivityInfo = source.readInt() != 0 ? ActivityInfo.CREATOR.createFromParcel(source) : null; isResizeable = source.readBoolean(); } /** Loading Loading @@ -294,6 +296,7 @@ public class TaskInfo { dest.writeInt(1); topActivityInfo.writeToParcel(dest, flags); } dest.writeBoolean(isResizeable); } @Override Loading @@ -308,6 +311,7 @@ public class TaskInfo { + " lastActiveTime=" + lastActiveTime + " supportsSplitScreenMultiWindow=" + supportsSplitScreenMultiWindow + " resizeMode=" + resizeMode + " isResizeable=" + isResizeable + " token=" + token + " topActivityType=" + topActivityType + " pictureInPictureParams=" + pictureInPictureParams Loading packages/SystemUI/src/com/android/systemui/stackdivider/Divider.java +1 −1 Original line number Diff line number Diff line Loading @@ -523,7 +523,7 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks, } void ensureMinimizedSplit() { setHomeMinimized(true /* minimized */, mSplits.mSecondary.isResizable()); setHomeMinimized(true /* minimized */, mSplits.mSecondary.isResizeable); if (!isDividerVisible()) { // Wasn't in split-mode yet, so enter now. if (DEBUG) { Loading packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java +2 −2 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ public class WindowManagerProxy { final ActivityManager.RunningTaskInfo ti = rootTasks.get(i); out.add(ti.token); if (ti.topActivityType == ACTIVITY_TYPE_HOME) { resizable = ti.isResizable(); resizable = ti.isResizeable; } } return resizable; Loading Loading @@ -179,7 +179,7 @@ public class WindowManagerProxy { for (int i = rootTasks.size() - 1; i >= 0; --i) { final ActivityManager.RunningTaskInfo rootTask = rootTasks.get(i); // Only move resizeable task to split secondary. WM will just ignore this anyways... if (!rootTask.isResizable()) continue; if (!rootTask.isResizeable) continue; // Only move fullscreen tasks to split secondary. if (rootTask.configuration.windowConfiguration.getWindowingMode() != WINDOWING_MODE_FULLSCREEN) { Loading services/core/java/com/android/server/wm/ActivityRecord.java +3 −1 Original line number Diff line number Diff line Loading @@ -2208,7 +2208,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } boolean isResizeable() { return ActivityInfo.isResizeableMode(info.resizeMode) || info.supportsPictureInPicture(); return mAtmService.mForceResizableActivities || ActivityInfo.isResizeableMode(info.resizeMode) || info.supportsPictureInPicture(); } /** @return whether this activity is non-resizeable or forced to be resizeable */ Loading services/core/java/com/android/server/wm/Task.java +4 −2 Original line number Diff line number Diff line Loading @@ -939,14 +939,15 @@ class Task extends WindowContainer<WindowContainer> { /** Sets the original intent, _without_ updating the calling uid or package. */ private void setIntent(Intent _intent, ActivityInfo info) { final boolean isLeaf = isLeafTask(); if (intent == null) { mNeverRelinquishIdentity = (info.flags & FLAG_RELINQUISH_TASK_IDENTITY) == 0; } else if (mNeverRelinquishIdentity) { } else if (mNeverRelinquishIdentity && isLeaf) { return; } affinity = isLeafTask() ? info.taskAffinity : null; affinity = isLeaf ? info.taskAffinity : null; if (intent == null) { // If this task already has an intent associated with it, don't set the root // affinity -- we don't want it changing after initially set, but the initially Loading Loading @@ -3587,6 +3588,7 @@ class Task extends WindowContainer<WindowContainer> { final Task top = getTopMostTask(); info.resizeMode = top != null ? top.mResizeMode : mResizeMode; info.topActivityType = top.getActivityType(); info.isResizeable = isResizeable(); ActivityRecord rootActivity = top.getRootActivity(); if (rootActivity == null || rootActivity.pictureInPictureArgs.empty()) { Loading Loading
core/java/android/app/TaskInfo.java +11 −7 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.app; import static android.content.pm.ActivityInfo.RESIZE_MODE_UNRESIZEABLE; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.TestApi; Loading Loading @@ -170,6 +168,14 @@ public class TaskInfo { @Nullable public ActivityInfo topActivityInfo; /** * Whether this task is resizable. Unlike {@link #resizeMode} (which is what the top activity * supports), this is what the system actually uses for resizability based on other policy and * developer options. * @hide */ public boolean isResizeable; TaskInfo() { // Do nothing } Loading @@ -192,11 +198,6 @@ public class TaskInfo { } } /** @hide */ public boolean isResizable() { return resizeMode != RESIZE_MODE_UNRESIZEABLE; } /** @hide */ @NonNull @TestApi Loading Loading @@ -245,6 +246,7 @@ public class TaskInfo { topActivityInfo = source.readInt() != 0 ? ActivityInfo.CREATOR.createFromParcel(source) : null; isResizeable = source.readBoolean(); } /** Loading Loading @@ -294,6 +296,7 @@ public class TaskInfo { dest.writeInt(1); topActivityInfo.writeToParcel(dest, flags); } dest.writeBoolean(isResizeable); } @Override Loading @@ -308,6 +311,7 @@ public class TaskInfo { + " lastActiveTime=" + lastActiveTime + " supportsSplitScreenMultiWindow=" + supportsSplitScreenMultiWindow + " resizeMode=" + resizeMode + " isResizeable=" + isResizeable + " token=" + token + " topActivityType=" + topActivityType + " pictureInPictureParams=" + pictureInPictureParams Loading
packages/SystemUI/src/com/android/systemui/stackdivider/Divider.java +1 −1 Original line number Diff line number Diff line Loading @@ -523,7 +523,7 @@ public class Divider extends SystemUI implements DividerView.DividerCallbacks, } void ensureMinimizedSplit() { setHomeMinimized(true /* minimized */, mSplits.mSecondary.isResizable()); setHomeMinimized(true /* minimized */, mSplits.mSecondary.isResizeable); if (!isDividerVisible()) { // Wasn't in split-mode yet, so enter now. if (DEBUG) { Loading
packages/SystemUI/src/com/android/systemui/stackdivider/WindowManagerProxy.java +2 −2 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ public class WindowManagerProxy { final ActivityManager.RunningTaskInfo ti = rootTasks.get(i); out.add(ti.token); if (ti.topActivityType == ACTIVITY_TYPE_HOME) { resizable = ti.isResizable(); resizable = ti.isResizeable; } } return resizable; Loading Loading @@ -179,7 +179,7 @@ public class WindowManagerProxy { for (int i = rootTasks.size() - 1; i >= 0; --i) { final ActivityManager.RunningTaskInfo rootTask = rootTasks.get(i); // Only move resizeable task to split secondary. WM will just ignore this anyways... if (!rootTask.isResizable()) continue; if (!rootTask.isResizeable) continue; // Only move fullscreen tasks to split secondary. if (rootTask.configuration.windowConfiguration.getWindowingMode() != WINDOWING_MODE_FULLSCREEN) { Loading
services/core/java/com/android/server/wm/ActivityRecord.java +3 −1 Original line number Diff line number Diff line Loading @@ -2208,7 +2208,9 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A } boolean isResizeable() { return ActivityInfo.isResizeableMode(info.resizeMode) || info.supportsPictureInPicture(); return mAtmService.mForceResizableActivities || ActivityInfo.isResizeableMode(info.resizeMode) || info.supportsPictureInPicture(); } /** @return whether this activity is non-resizeable or forced to be resizeable */ Loading
services/core/java/com/android/server/wm/Task.java +4 −2 Original line number Diff line number Diff line Loading @@ -939,14 +939,15 @@ class Task extends WindowContainer<WindowContainer> { /** Sets the original intent, _without_ updating the calling uid or package. */ private void setIntent(Intent _intent, ActivityInfo info) { final boolean isLeaf = isLeafTask(); if (intent == null) { mNeverRelinquishIdentity = (info.flags & FLAG_RELINQUISH_TASK_IDENTITY) == 0; } else if (mNeverRelinquishIdentity) { } else if (mNeverRelinquishIdentity && isLeaf) { return; } affinity = isLeafTask() ? info.taskAffinity : null; affinity = isLeaf ? info.taskAffinity : null; if (intent == null) { // If this task already has an intent associated with it, don't set the root // affinity -- we don't want it changing after initially set, but the initially Loading Loading @@ -3587,6 +3588,7 @@ class Task extends WindowContainer<WindowContainer> { final Task top = getTopMostTask(); info.resizeMode = top != null ? top.mResizeMode : mResizeMode; info.topActivityType = top.getActivityType(); info.isResizeable = isResizeable(); ActivityRecord rootActivity = top.getRootActivity(); if (rootActivity == null || rootActivity.pictureInPictureArgs.empty()) { Loading