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

Commit 5e78a77b authored by Wale Ogunwale's avatar Wale Ogunwale Committed by Automerger Merge Worker
Browse files

Merge "Only allow roots tasks to be organized" into rvc-dev am: 80849883 am: 086220ab

Change-Id: I0d31e238f53133c520057ad753c73c69df058acb
parents 367ec91f 086220ab
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1085,14 +1085,6 @@ public class DividerView extends FrameLayout implements OnTouchListener,
        crop.offsetTo(-(otherTaskRect.left - otherRect.left),
                -(otherTaskRect.top - otherRect.top));
        t.setWindowCrop(mTiles.mSecondarySurface, crop);
        // Reposition home and recents surfaces or they would be positioned relatively to its
        // parent (split-screen secondary task) position.
        for (int i = mTiles.mHomeAndRecentsSurfaces.size() - 1; i >= 0; --i) {
            t.setPosition(mTiles.mHomeAndRecentsSurfaces.get(i),
                    mTiles.mHomeBounds.left - otherTaskRect.left,
                    mTiles.mHomeBounds.top - otherTaskRect.top);
            t.setWindowCrop(mTiles.mHomeAndRecentsSurfaces.get(i), null);
        }
        final SurfaceControl dividerCtrl = getWindowSurfaceControl();
        if (dividerCtrl != null) {
            if (isHorizontalDivision()) {
+3 −0
Original line number Diff line number Diff line
@@ -2802,6 +2802,9 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
                    false /* includingParents */);
        }
        WindowContainerTransaction wct = new WindowContainerTransaction();
        // Clear out current windowing mode before reparenting to split taks.
        wct.setWindowingMode(
                task.getStack().mRemoteToken.toWindowContainerToken(), WINDOWING_MODE_UNDEFINED);
        wct.reparent(task.getStack().mRemoteToken.toWindowContainerToken(),
                primarySplitTask.mRemoteToken.toWindowContainerToken(), toTop);
        mWindowOrganizerController.applyTransaction(wct);
+2 −15
Original line number Diff line number Diff line
@@ -4068,21 +4068,7 @@ class Task extends WindowContainer<WindowContainer> {

    @Override
    boolean isOrganized() {
        final Task rootTask = getRootTask();
        if (rootTask.mTaskOrganizer == null) {
            // You are obviously not organized...
            return false;
        }
        if (rootTask == this) {
            // Root tasks can be organized.
            return true;
        }
        if (rootTask.mCreatedByOrganizer && getParent() == rootTask) {
            // Direct children of tasks added by the organizer can the organized.
            return true;
        }

        return false;
        return mTaskOrganizer != null;
    }

    @Override
@@ -4137,6 +4123,7 @@ class Task extends WindowContainer<WindowContainer> {
        }
   }

    @VisibleForTesting
    boolean setTaskOrganizer(ITaskOrganizer organizer) {
        if (mTaskOrganizer == organizer) {
            return false;