Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98ff2aed authored by Jorge Gil's avatar Jorge Gil Committed by Automerger Merge Worker
Browse files

Merge "Add null check on ActivityOptions before using it" into sc-v2-dev am:...

Merge "Add null check on ActivityOptions before using it" into sc-v2-dev am: ecdb3cdb am: 29509b34

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15997427

Change-Id: I27199964893c1a3191e18d1f935c13cda8e9d6df
parents 093a2030 29509b34
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -261,8 +261,7 @@ class TaskLaunchParamsModifier implements LaunchParamsModifier {
            if (launchMode == WINDOWING_MODE_PINNED) {
                if (DEBUG) appendLog("picture-in-picture");
            } else if (!root.isResizeable()) {
                if (shouldLaunchUnresizableAppInFreeform(root, suggestedDisplayArea,
                        options.getLaunchWindowingMode())) {
                if (shouldLaunchUnresizableAppInFreeform(root, suggestedDisplayArea, options)) {
                    launchMode = WINDOWING_MODE_FREEFORM;
                    if (outParams.mBounds.isEmpty()) {
                        getTaskBounds(root, suggestedDisplayArea, layout, launchMode,
@@ -618,8 +617,8 @@ class TaskLaunchParamsModifier implements LaunchParamsModifier {
    }

    private boolean shouldLaunchUnresizableAppInFreeform(ActivityRecord activity,
            TaskDisplayArea displayArea, int launchWindowingMode) {
        if (launchWindowingMode == WINDOWING_MODE_FULLSCREEN) {
            TaskDisplayArea displayArea, @Nullable ActivityOptions options) {
        if (options != null && options.getLaunchWindowingMode() == WINDOWING_MODE_FULLSCREEN) {
            // Do not launch the activity in freeform if it explicitly requested fullscreen mode.
            return false;
        }