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

Commit 9ebbe6af authored by Sriram Viswanathan's avatar Sriram Viswanathan
Browse files

Changes to support navigation bar system UI in car mode.

The change has all the platform changes required to support
modifications in the navbar dimensions and custom icons in car mode.
The UX is not frozen yet, but have placeholder resources provided
by android auto UX engineers.
The change assumes that the car mode configuration is known to the
WindowManagerService and uses its current ui mode to request the
latest from the policy (PhoneWindowManager.java). The change is
modeled on the way rotation is handled, where the Policy knows the
different view attributes for uiMode and just returns back the
window sizes based on the current uiMode requested. The policy does
know the current uiMode, but the order of when that changes is not
deterministic [from logs it does happen before any request to update
UI occurs, but guess that could change].

Bug: 25996809
Change-Id: Ia46cbe5096382d26c9eb8ec74cf59a059b767edb
parent 9d7272a6
Loading
Loading
Loading
Loading
+11 −7
Original line number Original line Diff line number Diff line
@@ -623,14 +623,16 @@ public interface WindowManagerPolicy {
     * decorations that can never be removed.  That is, system bar or
     * decorations that can never be removed.  That is, system bar or
     * button bar.
     * button bar.
     */
     */
    public int getNonDecorDisplayWidth(int fullWidth, int fullHeight, int rotation);
    public int getNonDecorDisplayWidth(int fullWidth, int fullHeight, int rotation,
            int uiMode);


    /**
    /**
     * Return the display height available after excluding any screen
     * Return the display height available after excluding any screen
     * decorations that can never be removed.  That is, system bar or
     * decorations that can never be removed.  That is, system bar or
     * button bar.
     * button bar.
     */
     */
    public int getNonDecorDisplayHeight(int fullWidth, int fullHeight, int rotation);
    public int getNonDecorDisplayHeight(int fullWidth, int fullHeight, int rotation,
            int uiMode);


    /**
    /**
     * Return the available screen width that we should report for the
     * Return the available screen width that we should report for the
@@ -638,7 +640,8 @@ public interface WindowManagerPolicy {
     * {@link #getNonDecorDisplayWidth(int, int, int)}; it may be smaller than
     * {@link #getNonDecorDisplayWidth(int, int, int)}; it may be smaller than
     * that to account for more transient decoration like a status bar.
     * that to account for more transient decoration like a status bar.
     */
     */
    public int getConfigDisplayWidth(int fullWidth, int fullHeight, int rotation);
    public int getConfigDisplayWidth(int fullWidth, int fullHeight, int rotation,
            int uiMode);


    /**
    /**
     * Return the available screen height that we should report for the
     * Return the available screen height that we should report for the
@@ -646,7 +649,8 @@ public interface WindowManagerPolicy {
     * {@link #getNonDecorDisplayHeight(int, int, int)}; it may be smaller than
     * {@link #getNonDecorDisplayHeight(int, int, int)}; it may be smaller than
     * that to account for more transient decoration like a status bar.
     * that to account for more transient decoration like a status bar.
     */
     */
    public int getConfigDisplayHeight(int fullWidth, int fullHeight, int rotation);
    public int getConfigDisplayHeight(int fullWidth, int fullHeight, int rotation,
            int uiMode);


    /**
    /**
     * Return whether the given window is forcibly hiding all windows except windows with
     * Return whether the given window is forcibly hiding all windows except windows with
@@ -861,11 +865,11 @@ public interface WindowManagerPolicy {
     * @param isDefaultDisplay true if window is on {@link Display#DEFAULT_DISPLAY}.
     * @param isDefaultDisplay true if window is on {@link Display#DEFAULT_DISPLAY}.
     * @param displayWidth The current full width of the screen.
     * @param displayWidth The current full width of the screen.
     * @param displayHeight The current full height of the screen.
     * @param displayHeight The current full height of the screen.
     * @param displayRotation The current rotation being applied to the base
     * @param displayRotation The current rotation being applied to the base window.
     * window.
     * @param uiMode The current uiMode in configuration.
     */
     */
    public void beginLayoutLw(boolean isDefaultDisplay, int displayWidth, int displayHeight,
    public void beginLayoutLw(boolean isDefaultDisplay, int displayWidth, int displayHeight,
                              int displayRotation);
                              int displayRotation, int uiMode);


    /**
    /**
     * Returns the bottom-most layer of the system decor, above which no policy decor should
     * Returns the bottom-most layer of the system decor, above which no policy decor should
+7 −0
Original line number Original line Diff line number Diff line
@@ -35,6 +35,13 @@
    <dimen name="navigation_bar_height_landscape">48dp</dimen>
    <dimen name="navigation_bar_height_landscape">48dp</dimen>
    <!-- Width of the navigation bar when it is placed vertically on the screen -->
    <!-- Width of the navigation bar when it is placed vertically on the screen -->
    <dimen name="navigation_bar_width">48dp</dimen>
    <dimen name="navigation_bar_width">48dp</dimen>
    <!-- Height of the bottom navigation / system bar in car mode. -->
    <dimen name="navigation_bar_height_car_mode">96dp</dimen>
    <!-- Height of the bottom navigation bar in portrait; often the same as
         @dimen/navigation_bar_height_car_mode -->
    <dimen name="navigation_bar_height_landscape_car_mode">96dp</dimen>
    <!-- Width of the navigation bar when it is placed vertically on the screen in car mode -->
    <dimen name="navigation_bar_width_car_mode">96dp</dimen>
    <!-- Height of notification icons in the status bar -->
    <!-- Height of notification icons in the status bar -->
    <dimen name="status_bar_icon_size">24dip</dimen>
    <dimen name="status_bar_icon_size">24dip</dimen>
    <!-- Size of the giant number (unread count) in the notifications -->
    <!-- Size of the giant number (unread count) in the notifications -->
+3 −0
Original line number Original line Diff line number Diff line
@@ -1497,6 +1497,9 @@
  <java-symbol type="dimen" name="navigation_bar_height" />
  <java-symbol type="dimen" name="navigation_bar_height" />
  <java-symbol type="dimen" name="navigation_bar_height_landscape" />
  <java-symbol type="dimen" name="navigation_bar_height_landscape" />
  <java-symbol type="dimen" name="navigation_bar_width" />
  <java-symbol type="dimen" name="navigation_bar_width" />
  <java-symbol type="dimen" name="navigation_bar_height_car_mode" />
  <java-symbol type="dimen" name="navigation_bar_height_landscape_car_mode" />
  <java-symbol type="dimen" name="navigation_bar_width_car_mode" />
  <java-symbol type="dimen" name="status_bar_height" />
  <java-symbol type="dimen" name="status_bar_height" />
  <java-symbol type="drawable" name="ic_jog_dial_sound_off" />
  <java-symbol type="drawable" name="ic_jog_dial_sound_off" />
  <java-symbol type="drawable" name="ic_jog_dial_sound_on" />
  <java-symbol type="drawable" name="ic_jog_dial_sound_on" />
+1.56 KiB
Loading image diff...
+1.6 KiB
Loading image diff...
Loading