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

Commit f0988b92 authored by Abhijoy Saha's avatar Abhijoy Saha Committed by Heemin Seog
Browse files

Improve SystemUIOverlayWindow control

1. Make sysui overlay window views more stable
2. hide/show system bars using insets in SystemUIOverlayWindow

Bug: 161926721
Bug: 151617493
Test: Manual & Unit Tests
Change-Id: I78fd2b5e8488d2f5006edd9773308e2bb9856d2b
parent 9a85dc9c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@
  ~ limitations under the License.
  -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:fitsSystemWindows="true"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:gravity="center"
+1 −3
Original line number Diff line number Diff line
@@ -22,12 +22,10 @@
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <!-- TODO(b/151617493): replace marginBottom with insets. -->
    <ViewStub android:id="@+id/notification_panel_stub"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:layout="@layout/notification_panel_container"
              android:layout_marginBottom="@dimen/navigation_bar_height"/>
              android:layout="@layout/notification_panel_container"/>

    <ViewStub android:id="@+id/keyguard_stub"
              android:layout_width="match_parent"
+5 −0
Original line number Diff line number Diff line
@@ -140,6 +140,11 @@ public class CarKeyguardViewController extends OverlayViewController implements
        registerUserSwitchedListener();
    }

    @Override
    protected boolean shouldShowNavigationBar() {
        return true;
    }

    @Override
    public void onFinishInflate() {
        mBouncer = SystemUIFactory.getInstance().createKeyguardBouncer(mContext,
+12 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.systemui.car.notification;

import static android.view.WindowInsets.Type.navigationBars;

import android.app.ActivityManager;
import android.car.Car;
import android.car.drivingstate.CarUxRestrictionsManager;
@@ -196,6 +198,16 @@ public class NotificationPanelViewController extends OverlayPanelViewController
        return true;
    }

    @Override
    protected boolean shouldShowStatusBar() {
        return true;
    }

    @Override
    protected int getInsetTypesToFit() {
        return navigationBars();
    }

    @Override
    protected boolean shouldShowHUN() {
        return mEnableHeadsUpNotificationWhenNotificationShadeOpen;
+5 −0
Original line number Diff line number Diff line
@@ -91,6 +91,11 @@ public class UserSwitchTransitionViewController extends OverlayViewController {
                R.integer.config_userSwitchTransitionViewShownTimeoutMs);
    }

    @Override
    protected int getInsetTypesToFit() {
        return 0;
    }

    /**
     * Makes the user switch transition view appear and draws the content inside of it if a user
     * that is different from the previous user is provided and if the dialog is not already
Loading