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

Commit 269f49d9 authored by JianYang Liu's avatar JianYang Liu Committed by Youngjun Kwak
Browse files

Added systemui controller to control system bars.

When config_remoteInsetsControllerControlsSystemBars is true,
DisplaySystemBarsController provides its own policy of how system
bars are displayed for specific packages. Currently limited to
only auto versions of Android.

Bug: 149585273
Test: Manual, atest BarControlPolicyTest, atest InsetsPolicyTest,
      atest DisplaySystemBarsControllerTest
Change-Id: Ie6b1cc3e2760cbc9e48d62dfbd8bc3e23ffca20c
Merged-In: Ie6b1cc3e2760cbc9e48d62dfbd8bc3e23ffca20c
parent 60de9363
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ package android {
  public static final class R.bool {
    field public static final int config_assistantOnTopOfDream = 17891333; // 0x1110005
    field public static final int config_perDisplayFocusEnabled = 17891332; // 0x1110004
    field public static final int config_remoteInsetsControllerControlsSystemBars = 17891334; // 0x1110006
  }

  public static final class R.string {
+7 −0
Original line number Diff line number Diff line
@@ -26,6 +26,13 @@ import android.view.InsetsState;
 */
oneway interface IDisplayWindowInsetsController {

    /**
     * Called when top focused window changes to determine whether or not to take over insets
     * control. Won't be called if config_remoteInsetsControllerControlsSystemBars is false.
     * @param packageName: Passes the top package name
     */
    void topFocusedWindowChanged(String packageName);

    /**
     * @see IWindow#insetsChanged
     */
+0 −10
Original line number Diff line number Diff line
@@ -387,16 +387,6 @@ interface IWindowManager
     */
    oneway void hideTransientBars(int displayId);

    /**
    * When set to {@code true} the system bars will always be shown. This is true even if an app
    * requests to be fullscreen by setting the system ui visibility flags. The
    * functionality was added for the automotive case as a way to guarantee required content stays
    * on screen at all times.
    *
    * @hide
    */
    oneway void setForceShowSystemBars(boolean show);

    /**
     * Called by System UI to notify of changes to the visibility of Recents.
     */
+11 −4
Original line number Diff line number Diff line
@@ -712,10 +712,17 @@
          case, this can be disabled (set to false). -->
    <bool name="config_enableCarDockHomeLaunch">true</bool>

    <!-- Control whether to force the display of System UI Bars at all times regardless of
         System Ui Flags. This can be useful in the Automotive case if there's a requirement for
         a UI element to be on screen at all times. -->
    <bool name="config_forceShowSystemBars">false</bool>
    <!-- Control whether to force apps to give up control over the display of system bars at all
         times regardless of System Ui Flags.
         In the Automotive case, this is helpful if there's a requirement for an UI element to be on
         screen at all times. Setting this to true also gives System UI the ability to override the
         visibility controls for the system through the usage of the
         "SYSTEM_BAR_VISIBILITY_OVERRIDE" setting.
         Ex: Only setting the config to true will force show system bars for the entire system.
         Ex: Setting the config to true and the "SYSTEM_BAR_VISIBILITY_OVERRIDE" setting to
         "immersive.status=apps" will force show navigation bar for all apps and force hide status
         bar for all apps. -->
    <bool name="config_remoteInsetsControllerControlsSystemBars">false</bool>

    <!-- HDMI behavior -->

+2 −0
Original line number Diff line number Diff line
@@ -3024,6 +3024,8 @@

    <!-- @hide @TestApi -->
    <public type="bool" name="config_assistantOnTopOfDream" id="0x01110005" />
    <!-- @hide @TestApi -->
    <public type="bool" name="config_remoteInsetsControllerControlsSystemBars" id="0x01110006" />
  <!-- ===============================================================
       Resources added in version S of the platform

Loading