Merge "Do not change launch mode to FF is FS explicitly requested" into sc-v2-dev am: 7c2508117c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15910695 Change-Id: I339ec385c2214fb3e7406c1b6ab4c2986365e46b
This commit is contained in:
@@ -261,7 +261,8 @@ class TaskLaunchParamsModifier implements LaunchParamsModifier {
|
|||||||
if (launchMode == WINDOWING_MODE_PINNED) {
|
if (launchMode == WINDOWING_MODE_PINNED) {
|
||||||
if (DEBUG) appendLog("picture-in-picture");
|
if (DEBUG) appendLog("picture-in-picture");
|
||||||
} else if (!root.isResizeable()) {
|
} else if (!root.isResizeable()) {
|
||||||
if (shouldLaunchUnresizableAppInFreeform(root, suggestedDisplayArea)) {
|
if (shouldLaunchUnresizableAppInFreeform(root, suggestedDisplayArea,
|
||||||
|
options.getLaunchWindowingMode())) {
|
||||||
launchMode = WINDOWING_MODE_FREEFORM;
|
launchMode = WINDOWING_MODE_FREEFORM;
|
||||||
if (outParams.mBounds.isEmpty()) {
|
if (outParams.mBounds.isEmpty()) {
|
||||||
getTaskBounds(root, suggestedDisplayArea, layout, launchMode,
|
getTaskBounds(root, suggestedDisplayArea, layout, launchMode,
|
||||||
@@ -617,7 +618,11 @@ class TaskLaunchParamsModifier implements LaunchParamsModifier {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean shouldLaunchUnresizableAppInFreeform(ActivityRecord activity,
|
private boolean shouldLaunchUnresizableAppInFreeform(ActivityRecord activity,
|
||||||
TaskDisplayArea displayArea) {
|
TaskDisplayArea displayArea, int launchWindowingMode) {
|
||||||
|
if (launchWindowingMode == WINDOWING_MODE_FULLSCREEN) {
|
||||||
|
// Do not launch the activity in freeform if it explicitly requested fullscreen mode.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (!activity.supportsFreeformInDisplayArea(displayArea) || activity.isResizeable()) {
|
if (!activity.supportsFreeformInDisplayArea(displayArea) || activity.isResizeable()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user