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

Commit 7f8023e3 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Handle the case where launch root is not attached" into udc-dev am:...

Merge "Handle the case where launch root is not attached" into udc-dev am: a7afe1ab am: 112457fc am: 7caf3577

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



Change-Id: I436dada0b6bd7ef47ba3c44e0bb0b5c4a6cc4063
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6b8d43d1 7caf3577
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -845,11 +845,14 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
            case HIERARCHY_OP_TYPE_SET_LAUNCH_ROOT: {
                final WindowContainer wc = WindowContainer.fromBinder(hop.getContainer());
                final Task task = wc != null ? wc.asTask() : null;
                if (task != null) {
                if (task == null) {
                    throw new IllegalArgumentException("Cannot set non-task as launch root: " + wc);
                } else if (task.getTaskDisplayArea() == null) {
                    throw new IllegalArgumentException("Cannot set a task without display area as "
                            + "launch root: " + wc);
                } else {
                    task.getDisplayArea().setLaunchRootTask(task,
                            hop.getWindowingModes(), hop.getActivityTypes());
                } else {
                    throw new IllegalArgumentException("Cannot set non-task as launch root: " + wc);
                }
                break;
            }