Loading services/core/java/com/android/server/wm/WindowOrganizerController.java +6 −6 Original line number Original line Diff line number Diff line Loading @@ -18,7 +18,7 @@ package com.android.server.wm; import static android.Manifest.permission.START_TASKS_FROM_RECENTS; import static android.Manifest.permission.START_TASKS_FROM_RECENTS; import static android.app.ActivityManager.isStartResultSuccessful; import static android.app.ActivityManager.isStartResultSuccessful; import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED; import static android.app.WindowConfiguration.WINDOW_CONFIG_BOUNDS; import static android.app.WindowConfiguration.WINDOW_CONFIG_BOUNDS; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.Display.DEFAULT_DISPLAY; import static android.window.TaskFragmentOperation.OP_TYPE_CLEAR_ADJACENT_TASK_FRAGMENTS; import static android.window.TaskFragmentOperation.OP_TYPE_CLEAR_ADJACENT_TASK_FRAGMENTS; Loading Loading @@ -532,9 +532,9 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub // setWindowingMode call in force-hidden. // setWindowingMode call in force-hidden. boolean forceHiddenForPip = false; boolean forceHiddenForPip = false; if (wc.asTask() != null && wc.inPinnedWindowingMode() if (wc.asTask() != null && wc.inPinnedWindowingMode() && entry.getValue().getWindowingMode() == WINDOWING_MODE_UNDEFINED) { && entry.getValue().getWindowingMode() != WINDOWING_MODE_PINNED) { // We are in pip and going to undefined. Now search hierarchy ops to determine // We are going out of pip. Now search hierarchy ops to determine whether we // whether we are removing pip or expanding pip. // are removing pip or expanding pip. for (int i = 0; i < hopSize; ++i) { for (int i = 0; i < hopSize; ++i) { final WindowContainerTransaction.HierarchyOp hop = hops.get(i); final WindowContainerTransaction.HierarchyOp hop = hops.get(i); if (hop.getType() != HIERARCHY_OP_TYPE_REORDER) continue; if (hop.getType() != HIERARCHY_OP_TYPE_REORDER) continue; Loading Loading @@ -670,7 +670,7 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub + " windowing mode during locked task mode."); + " windowing mode during locked task mode."); } } if (windowingMode == WindowConfiguration.WINDOWING_MODE_PINNED) { if (windowingMode == WINDOWING_MODE_PINNED) { // Do not directly put the container into PINNED mode as it may not support it or // Do not directly put the container into PINNED mode as it may not support it or // the app may not want to enter it. Instead, send a signal to request PIP // the app may not want to enter it. Instead, send a signal to request PIP // mode to the app if they wish to support it below in #applyTaskChanges. // mode to the app if they wish to support it below in #applyTaskChanges. Loading Loading @@ -722,7 +722,7 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub tr.mDisplayContent.mPinnedTaskController.setEnterPipBounds(enterPipBounds); tr.mDisplayContent.mPinnedTaskController.setEnterPipBounds(enterPipBounds); } } if (c.getWindowingMode() == WindowConfiguration.WINDOWING_MODE_PINNED if (c.getWindowingMode() == WINDOWING_MODE_PINNED && !tr.inPinnedWindowingMode()) { && !tr.inPinnedWindowingMode()) { final ActivityRecord activity = tr.getTopNonFinishingActivity(); final ActivityRecord activity = tr.getTopNonFinishingActivity(); if (activity != null) { if (activity != null) { Loading Loading
services/core/java/com/android/server/wm/WindowOrganizerController.java +6 −6 Original line number Original line Diff line number Diff line Loading @@ -18,7 +18,7 @@ package com.android.server.wm; import static android.Manifest.permission.START_TASKS_FROM_RECENTS; import static android.Manifest.permission.START_TASKS_FROM_RECENTS; import static android.app.ActivityManager.isStartResultSuccessful; import static android.app.ActivityManager.isStartResultSuccessful; import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED; import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED; import static android.app.WindowConfiguration.WINDOW_CONFIG_BOUNDS; import static android.app.WindowConfiguration.WINDOW_CONFIG_BOUNDS; import static android.view.Display.DEFAULT_DISPLAY; import static android.view.Display.DEFAULT_DISPLAY; import static android.window.TaskFragmentOperation.OP_TYPE_CLEAR_ADJACENT_TASK_FRAGMENTS; import static android.window.TaskFragmentOperation.OP_TYPE_CLEAR_ADJACENT_TASK_FRAGMENTS; Loading Loading @@ -532,9 +532,9 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub // setWindowingMode call in force-hidden. // setWindowingMode call in force-hidden. boolean forceHiddenForPip = false; boolean forceHiddenForPip = false; if (wc.asTask() != null && wc.inPinnedWindowingMode() if (wc.asTask() != null && wc.inPinnedWindowingMode() && entry.getValue().getWindowingMode() == WINDOWING_MODE_UNDEFINED) { && entry.getValue().getWindowingMode() != WINDOWING_MODE_PINNED) { // We are in pip and going to undefined. Now search hierarchy ops to determine // We are going out of pip. Now search hierarchy ops to determine whether we // whether we are removing pip or expanding pip. // are removing pip or expanding pip. for (int i = 0; i < hopSize; ++i) { for (int i = 0; i < hopSize; ++i) { final WindowContainerTransaction.HierarchyOp hop = hops.get(i); final WindowContainerTransaction.HierarchyOp hop = hops.get(i); if (hop.getType() != HIERARCHY_OP_TYPE_REORDER) continue; if (hop.getType() != HIERARCHY_OP_TYPE_REORDER) continue; Loading Loading @@ -670,7 +670,7 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub + " windowing mode during locked task mode."); + " windowing mode during locked task mode."); } } if (windowingMode == WindowConfiguration.WINDOWING_MODE_PINNED) { if (windowingMode == WINDOWING_MODE_PINNED) { // Do not directly put the container into PINNED mode as it may not support it or // Do not directly put the container into PINNED mode as it may not support it or // the app may not want to enter it. Instead, send a signal to request PIP // the app may not want to enter it. Instead, send a signal to request PIP // mode to the app if they wish to support it below in #applyTaskChanges. // mode to the app if they wish to support it below in #applyTaskChanges. Loading Loading @@ -722,7 +722,7 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub tr.mDisplayContent.mPinnedTaskController.setEnterPipBounds(enterPipBounds); tr.mDisplayContent.mPinnedTaskController.setEnterPipBounds(enterPipBounds); } } if (c.getWindowingMode() == WindowConfiguration.WINDOWING_MODE_PINNED if (c.getWindowingMode() == WINDOWING_MODE_PINNED && !tr.inPinnedWindowingMode()) { && !tr.inPinnedWindowingMode()) { final ActivityRecord activity = tr.getTopNonFinishingActivity(); final ActivityRecord activity = tr.getTopNonFinishingActivity(); if (activity != null) { if (activity != null) { Loading