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

Commit 9b751800 authored by Hongwei Wang's avatar Hongwei Wang
Browse files

Moves shelf offset into SysUI package

With this change, the shelf offset will be set directly by Launcher to
SysUI without WM being involved.

PinnedStackControllerTest is removed in this change since the only test
function is against WM.setShelfHeight. However, new tests regard
PinnedStackController should be added per b/141200935.

See also: go/pip-sysui-migration

Bug: 139016518
Test: atest PinnedStackTests
Change-Id: I606de3d8106ac12d7bf2b367877bc5bb345af3fe
parent df801fcf
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -54,14 +54,6 @@ oneway interface IPinnedStackListener {
     */
    void onImeVisibilityChanged(boolean imeVisible, int imeHeight);

    /**
     * Called when window manager decides to adjust the pinned stack bounds because of the shelf, or
     * when the listener is first registered to allow the listener to synchronized its state with
     * the controller.  This call will always be followed by a onMovementBoundsChanged() call
     * with fromShelfAdjustment set to {@code true}.
     */
    void onShelfVisibilityChanged(boolean shelfVisible, int shelfHeight);

    /**
     * Called when window manager decides to adjust the minimized state, or when the listener
     * is first registered to allow the listener to synchronized its state with the controller.
+0 −6
Original line number Diff line number Diff line
@@ -325,12 +325,6 @@ interface IWindowManager
     */
    oneway void setPipVisibility(boolean visible);

    /**
     * Called by System UI to notify of changes to the visibility and height of the shelf.
     */
    @UnsupportedAppUsage
    void setShelfHeight(boolean visible, int shelfHeight);

    /**
     * Called by System UI to enable or disable haptic feedback on the navigation bar buttons.
     */
+5 −0
Original line number Diff line number Diff line
@@ -109,4 +109,9 @@ interface ISystemUiProxy {
     * Ends the system screen pinning.
     */
    void stopScreenPinning() = 17;

    /**
     * Sets the shelf height and visibility.
     */
    void setShelfHeight(boolean visible, int shelfHeight) = 20;
}
+0 −9
Original line number Diff line number Diff line
@@ -68,13 +68,6 @@ public class PinnedStackListenerForwarder extends IPinnedStackListener.Stub {
        }
    }

    @Override
    public void onShelfVisibilityChanged(boolean shelfVisible, int shelfHeight) {
        for (PinnedStackListener listener : mListeners) {
            listener.onShelfVisibilityChanged(shelfVisible, shelfHeight);
        }
    }

    @Override
    public void onMinimizedStateChanged(boolean isMinimized) {
        for (PinnedStackListener listener : mListeners) {
@@ -143,8 +136,6 @@ public class PinnedStackListenerForwarder extends IPinnedStackListener.Stub {

        public void onImeVisibilityChanged(boolean imeVisible, int imeHeight) {}

        public void onShelfVisibilityChanged(boolean shelfVisible, int shelfHeight) {}

        public void onMinimizedStateChanged(boolean isMinimized) {}

        public void onActionsChanged(ParceledListSlice actions) {}
+0 −8
Original line number Diff line number Diff line
@@ -143,14 +143,6 @@ public class WindowManagerWrapper {
        }
    }

    public void setShelfHeight(boolean visible, int shelfHeight) {
        try {
            WindowManagerGlobal.getWindowManagerService().setShelfHeight(visible, shelfHeight);
        } catch (RemoteException e) {
            Log.w(TAG, "Failed to set shelf height");
        }
    }

    public void setRecentsVisibility(boolean visible) {
        try {
            WindowManagerGlobal.getWindowManagerService().setRecentsVisibility(visible);
Loading