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

Commit 8002e7f9 authored by Tracy Zhou's avatar Tracy Zhou Committed by android-build-merger
Browse files

Merge "Move default pip position to right above the shelf." into pi-dev am: 017f44be

am: 6f9ebab4

Change-Id: I65e587befec2dcba43b95fe6c6d8775a918fd332
parents 17542558 6f9ebab4
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -385,4 +385,10 @@ public abstract class ActivityManagerInternal {
     * Returns a list that contains the memory stats for currently running processes.
     * Returns a list that contains the memory stats for currently running processes.
     */
     */
    public abstract List<ProcessMemoryState> getMemoryStateForProcesses();
    public abstract List<ProcessMemoryState> getMemoryStateForProcesses();

    /**
     * This enforces {@code func} can only be called if either the caller is Recents activity or
     * has {@code permission}.
     */
    public abstract void enforceCallerIsRecentsOrHasPermission(String permission, String func);
}
}
+10 −2
Original line number Original line Diff line number Diff line
@@ -47,16 +47,24 @@ oneway interface IPinnedStackListener {
     * the WM has changed in the mean time but the client has not received onMovementBoundsChanged).
     * the WM has changed in the mean time but the client has not received onMovementBoundsChanged).
     */
     */
    void onMovementBoundsChanged(in Rect insetBounds, in Rect normalBounds, in Rect animatingBounds,
    void onMovementBoundsChanged(in Rect insetBounds, in Rect normalBounds, in Rect animatingBounds,
            boolean fromImeAdjustement, int displayRotation);
            boolean fromImeAdjustment, boolean fromShelfAdjustment, int displayRotation);


    /**
    /**
     * Called when window manager decides to adjust the pinned stack bounds because of the IME, or
     * Called when window manager decides to adjust the pinned stack bounds because of the IME, or
     * when the listener is first registered to allow the listener to synchronized its state with
     * 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
     * the controller.  This call will always be followed by a onMovementBoundsChanged() call
     * with fromImeAdjustement set to true.
     * with fromImeAdjustement set to {@code true}.
     */
     */
    void onImeVisibilityChanged(boolean imeVisible, int imeHeight);
    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
     * 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.
     * is first registered to allow the listener to synchronized its state with the controller.
+8 −3
Original line number Original line Diff line number Diff line
@@ -284,6 +284,11 @@ interface IWindowManager
     */
     */
    oneway void setPipVisibility(boolean visible);
    oneway void setPipVisibility(boolean visible);


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

    /**
    /**
     * Called by System UI to enable or disable haptic feedback on the navigation bar buttons.
     * Called by System UI to enable or disable haptic feedback on the navigation bar buttons.
     */
     */
+2 −2
Original line number Original line Diff line number Diff line
@@ -325,14 +325,14 @@ public class PipSnapAlgorithm {
     * {@param stackBounds}.
     * {@param stackBounds}.
     */
     */
    public void getMovementBounds(Rect stackBounds, Rect insetBounds, Rect movementBoundsOut,
    public void getMovementBounds(Rect stackBounds, Rect insetBounds, Rect movementBoundsOut,
            int imeHeight) {
            int bottomOffset) {
        // Adjust the right/bottom to ensure the stack bounds never goes offscreen
        // Adjust the right/bottom to ensure the stack bounds never goes offscreen
        movementBoundsOut.set(insetBounds);
        movementBoundsOut.set(insetBounds);
        movementBoundsOut.right = Math.max(insetBounds.left, insetBounds.right -
        movementBoundsOut.right = Math.max(insetBounds.left, insetBounds.right -
                stackBounds.width());
                stackBounds.width());
        movementBoundsOut.bottom = Math.max(insetBounds.top, insetBounds.bottom -
        movementBoundsOut.bottom = Math.max(insetBounds.top, insetBounds.bottom -
                stackBounds.height());
                stackBounds.height());
        movementBoundsOut.bottom -= imeHeight;
        movementBoundsOut.bottom -= bottomOffset;
    }
    }


    /**
    /**
+2 −2
Original line number Original line Diff line number Diff line
@@ -2943,8 +2943,8 @@
    <item name="config_pictureInPictureAspectRatioLimitForMinSize" format="float" type="dimen">1.777778</item>
    <item name="config_pictureInPictureAspectRatioLimitForMinSize" format="float" type="dimen">1.777778</item>


    <!-- The default gravity for the picture-in-picture window.
    <!-- The default gravity for the picture-in-picture window.
         Currently, this maps to Gravity.TOP | Gravity.RIGHT -->
         Currently, this maps to Gravity.BOTTOM | Gravity.RIGHT -->
    <integer name="config_defaultPictureInPictureGravity">0x35</integer>
    <integer name="config_defaultPictureInPictureGravity">0x55</integer>


    <!-- The minimum aspect ratio (width/height) that is supported for picture-in-picture.  Any
    <!-- The minimum aspect ratio (width/height) that is supported for picture-in-picture.  Any
         ratio smaller than this is considered too tall and thin to be usable. Currently, this
         ratio smaller than this is considered too tall and thin to be usable. Currently, this
Loading