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

Commit b872b967 authored by Tiger's avatar Tiger
Browse files

Remove alt bars from DisplayPolicy

The alt bars were used to decide if the transient bars should be shown
or not, based on their positions on the display. However, the logic of
computing the position was not perfect. It just considered some cases
of gravity, but not all the cases. Instead, this CL uses the insets to
decide which side of display a source window is on.

Also, the alt bar is assigned based on the internal insets type that the
window provides. We won't have the internal types in the furture.

This is a step to remove internal insets types.

Bug: 234093736
Test: atest WindowInsetsControllerTests
Change-Id: Ia9fb857d5be0df57d5d613a033e1e886f04bb479
parent 39f6ecbe
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -55,13 +55,6 @@ public interface WindowManagerPolicyConstants {
    int PRESENCE_INTERNAL = 1 << 0;
    int PRESENCE_EXTERNAL = 1 << 1;

    // Alternate bars position values
    int ALT_BAR_UNKNOWN = -1;
    int ALT_BAR_LEFT = 1 << 0;
    int ALT_BAR_RIGHT = 1 << 1;
    int ALT_BAR_BOTTOM = 1 << 2;
    int ALT_BAR_TOP = 1 << 3;

    // Navigation bar position values
    int NAV_BAR_INVALID = -1;
    int NAV_BAR_LEFT = 1 << 0;
+0 −4
Original line number Diff line number Diff line
@@ -136,10 +136,6 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants {
    @IntDef({NAV_BAR_LEFT, NAV_BAR_RIGHT, NAV_BAR_BOTTOM})
    @interface NavigationBarPosition {}

    @Retention(SOURCE)
    @IntDef({ALT_BAR_UNKNOWN, ALT_BAR_LEFT, ALT_BAR_RIGHT, ALT_BAR_BOTTOM, ALT_BAR_TOP})
    @interface AltBarPosition {}

    /**
     * Pass this event to the user / app.  To be returned from
     * {@link #interceptKeyBeforeQueueing}.
+97 −221

File changed.

Preview size limit exceeded, changes collapsed.