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

Commit 2d88183b authored by Evan Rosky's avatar Evan Rosky Committed by Android (Google) Code Review
Browse files

Merge "SystemUI Split via TaskOrganizer"

parents 520fa831 af9f27cd
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -315,11 +315,6 @@ interface IActivityTaskManager {
    void positionTaskInStack(int taskId, int stackId, int position);
    void reportSizeConfigurations(in IBinder token, in int[] horizontalSizeConfiguration,
            in int[] verticalSizeConfigurations, in int[] smallestWidthConfigurations);
    /**
     * Dismisses split-screen multi-window mode.
     * {@param toTop} If true the current primary split-screen stack will be placed or left on top.
     */
    void dismissSplitScreenMode(boolean toTop);

    /**
     * Dismisses PiP
+9 −0
Original line number Diff line number Diff line
@@ -163,6 +163,15 @@ public class WindowlessWindowManager implements IWindowSession {
        return !PixelFormat.formatHasAlpha(attrs.format);
    }

    /** @hide */
    protected SurfaceControl getSurfaceControl(View rootView) {
        final State s = mStateForWindow.get(rootView.getViewRootImpl().mWindow.asBinder());
        if (s == null) {
            return null;
        }
        return s.mSurfaceControl;
    }

    @Override
    public int relayout(IWindow window, int seq, WindowManager.LayoutParams inAttrs,
            int requestedWidth, int requestedHeight, int viewFlags, int flags, long frameNumber,
+20 −19
Original line number Diff line number Diff line
@@ -16,14 +16,15 @@

package com.android.internal.policy;

import android.graphics.Rect;

import static android.view.WindowManager.DOCKED_BOTTOM;
import static android.view.WindowManager.DOCKED_INVALID;
import static android.view.WindowManager.DOCKED_LEFT;
import static android.view.WindowManager.DOCKED_RIGHT;
import static android.view.WindowManager.DOCKED_TOP;

import android.content.res.Resources;
import android.graphics.Rect;

/**
 * Utility functions for docked stack divider used by both window manager and System UI.
 *
@@ -105,23 +106,6 @@ public class DockedDividerUtils {
        return start + (end - start) / 2 - dividerSize / 2;
    }

    public static int getDockSideFromCreatedMode(boolean dockOnTopOrLeft,
            boolean isHorizontalDivision) {
        if (dockOnTopOrLeft) {
            if (isHorizontalDivision) {
                return DOCKED_TOP;
            } else {
                return DOCKED_LEFT;
            }
        } else {
            if (isHorizontalDivision) {
                return DOCKED_BOTTOM;
            } else {
                return DOCKED_RIGHT;
            }
        }
    }

    public static int invertDockSide(int dockSide) {
        switch (dockSide) {
            case DOCKED_LEFT:
@@ -136,4 +120,21 @@ public class DockedDividerUtils {
                return DOCKED_INVALID;
        }
    }

    /** Returns the inset distance from the divider window edge to the dividerview. */
    public static int getDividerInsets(Resources res) {
        return res.getDimensionPixelSize(com.android.internal.R.dimen.docked_stack_divider_insets);
    }

    /** Returns the size of the divider */
    public static int getDividerSize(Resources res, int dividerInsets) {
        final int windowWidth = res.getDimensionPixelSize(
                com.android.internal.R.dimen.docked_stack_divider_thickness);
        return windowWidth - 2 * dividerInsets;
    }

    /** Returns the docked-stack side */
    public static int getDockSide(int displayWidth, int displayHeight) {
        return displayWidth > displayHeight ? DOCKED_LEFT : DOCKED_TOP;
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -275,6 +275,7 @@ message TaskProto {
    optional float adjust_divider_amount = 25;
    optional bool animating_bounds = 26;
    optional float minimize_amount = 27;
    optional bool created_by_organizer = 28;
}

/* represents ActivityRecordProto */
+5 −0
Original line number Diff line number Diff line
@@ -123,4 +123,9 @@ interface ISystemUiProxy {
     */
     void handleImageAsScreenshot(in Bitmap screenImage, in Rect locationInScreen,
              in Insets visibleInsets, int taskId) = 21;

    /**
     * Sets the split-screen divider minimized state
     */
    void setSplitScreenMinimized(boolean minimized) = 22;
}
Loading