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

Commit 61f39a7b authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Migrate docked divider drawing to SysUI

Move docked divider drawing to SysUI. This let's us have real
time shadows in the future. Keep DockedStackDividerController
for placing/visibility in window manager.

Change-Id: I82c10add626d30f2ba180ee2a21cdbe6ddfe0371
parent 2f7d2925
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -769,7 +769,11 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
        case RESIZE_STACK_TRANSACTION: {
            data.enforceInterface(IActivityManager.descriptor);
            final int stackId = data.readInt();
            Rect r = Rect.CREATOR.createFromParcel(data);
            final boolean hasRect = data.readInt() != 0;
            Rect r = null;
            if (hasRect) {
                r = Rect.CREATOR.createFromParcel(data);
            }
            final boolean allowResizeInDockedMode = data.readInt() == 1;
            resizeStack(stackId, r, allowResizeInDockedMode);
            reply.writeNoException();
@@ -3590,7 +3594,12 @@ class ActivityManagerProxy implements IActivityManager
        Parcel reply = Parcel.obtain();
        data.writeInterfaceToken(IActivityManager.descriptor);
        data.writeInt(stackId);
        if (r != null) {
            data.writeInt(1);
            r.writeToParcel(data, 0);
        } else {
            data.writeInt(0);
        }
        data.writeInt(allowResizeInDockedMode ? 1 : 0);
        mRemote.transact(RESIZE_STACK_TRANSACTION, data, reply, 0);
        reply.readException();
+12 −0
Original line number Diff line number Diff line
@@ -327,4 +327,16 @@ interface IWindowManager
     * @return The frame statistics or null if the window does not exist.
     */
    WindowContentFrameStats getWindowContentFrameStats(IBinder token);

    /**
     * @return the dock side the current docked stack is at; must be one of the
     *         WindowManagerGlobal.DOCKED_* values
     */
    int getDockedStackSide();

    /**
     * Sets whether we are currently in a drag resize operation where we are changing the docked
     * stack size.
     */
    void setDockedStackResizing(boolean resizing);
}
+12 −0
Original line number Diff line number Diff line
@@ -50,6 +50,18 @@ import android.util.Log;
 * @see android.content.Context#WINDOW_SERVICE
 */
public interface WindowManager extends ViewManager {

    /** @hide */
    int DOCKED_INVALID = -1;
    /** @hide */
    int DOCKED_LEFT = 1;
    /** @hide */
    int DOCKED_TOP = 2;
    /** @hide */
    int DOCKED_RIGHT = 3;
    /** @hide */
    int DOCKED_BOTTOM = 4;

    /**
     * Exception that is thrown when trying to add view whose
     * {@link LayoutParams} {@link LayoutParams#token}
+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
-->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="@dimen/docked_stack_divider_thickness"
        android:layout_width="@*android:dimen/docked_stack_divider_thickness"
        android:layout_height="match_parent"
        android:background="@android:color/black"
        />
+4 −0
Original line number Diff line number Diff line
@@ -577,4 +577,8 @@

    <!-- TODO: Remove this -->
    <dimen name="qs_header_neg_padding">-8dp</dimen>

    <!-- Distance from the edge of the screen when scrubbing the docked stack divider is considered
         a dismissal -->
    <dimen name="docked_stack_divider_dismiss_distance">100dp</dimen>
</resources>
Loading