summaryrefslogtreecommitdiff
path: root/packages/CarSystemUI/src
diff options
context:
space:
mode:
authorHeemin Seog <hseog@google.com>2020-09-23 16:12:56 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-09-23 16:12:56 +0000
commitde4108ef12ecf47d3dad31c8f78eff30a99f1a2c (patch)
tree6b56d9c4426bfb2f8a8c13bc1b0480d9bbc1eee0 /packages/CarSystemUI/src
parent6c1ccd172eb0437adf6865552100c473eed5ede0 (diff)
parentbda41b51b5aae73e4d89f7bb3c4141b442176d9c (diff)
Merge "Ensure notif panel behavior in immersive mode" into rvc-qpr-dev am: 7c6a4eee44 am: bda41b51b5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12642386 Change-Id: I35d582afd9c69445d9c6f620f8a75b6cddb0b8d6
Diffstat (limited to 'packages/CarSystemUI/src')
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/navigationbar/SystemBarConfigs.java4
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java25
2 files changed, 24 insertions, 5 deletions
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/SystemBarConfigs.java b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/SystemBarConfigs.java
index 078196e18b88..dfda4e6b2635 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/SystemBarConfigs.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/navigationbar/SystemBarConfigs.java
@@ -216,7 +216,7 @@ public class SystemBarConfigs {
new SystemBarConfigBuilder()
.setSide(TOP)
.setGirth(mResources.getDimensionPixelSize(
- com.android.internal.R.dimen.status_bar_height))
+ R.dimen.car_top_navigation_bar_height))
.setBarType(mResources.getInteger(R.integer.config_topSystemBarType))
.setZOrder(mResources.getInteger(R.integer.config_topSystemBarZOrder))
.setHideForKeyboard(mResources.getBoolean(
@@ -230,7 +230,7 @@ public class SystemBarConfigs {
new SystemBarConfigBuilder()
.setSide(BOTTOM)
.setGirth(mResources.getDimensionPixelSize(
- com.android.internal.R.dimen.navigation_bar_height))
+ R.dimen.car_bottom_navigation_bar_height))
.setBarType(mResources.getInteger(R.integer.config_bottomSystemBarType))
.setZOrder(
mResources.getInteger(R.integer.config_bottomSystemBarZOrder))
diff --git a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java
index c7155f4b21d2..e8b332149864 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java
@@ -16,8 +16,6 @@
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;
@@ -25,6 +23,8 @@ import android.content.Context;
import android.content.res.Resources;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
+import android.inputmethodservice.InputMethodService;
+import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
import android.view.GestureDetector;
@@ -82,6 +82,7 @@ public class NotificationPanelViewController extends OverlayPanelViewController
private final StatusBarStateController mStatusBarStateController;
private final boolean mEnableHeadsUpNotificationWhenNotificationShadeOpen;
private final NotificationVisibilityLogger mNotificationVisibilityLogger;
+ private final int mNavBarHeight;
private float mInitialBackgroundAlpha;
private float mBackgroundAlphaDiff;
@@ -138,7 +139,10 @@ public class NotificationPanelViewController extends OverlayPanelViewController
mStatusBarStateController = statusBarStateController;
mNotificationVisibilityLogger = notificationVisibilityLogger;
+ mNavBarHeight = mResources.getDimensionPixelSize(R.dimen.car_bottom_navigation_bar_height);
+
mCommandQueue.addCallback(this);
+
// Notification background setup.
mInitialBackgroundAlpha = (float) mResources.getInteger(
R.integer.config_initialNotificationBackgroundAlpha) / 100;
@@ -179,6 +183,21 @@ public class NotificationPanelViewController extends OverlayPanelViewController
}
}
+ @Override
+ public void setImeWindowStatus(int displayId, IBinder token, int vis, int backDisposition,
+ boolean showImeSwitcher) {
+ if (mContext.getDisplayId() != displayId) {
+ return;
+ }
+ boolean isKeyboardVisible = (vis & InputMethodService.IME_VISIBLE) != 0;
+ int bottomMargin = isKeyboardVisible ? 0 : mNavBarHeight;
+ ViewGroup container = (ViewGroup) getLayout();
+ ViewGroup.MarginLayoutParams params =
+ (ViewGroup.MarginLayoutParams) container.getLayoutParams();
+ params.setMargins(params.leftMargin, params.topMargin, params.rightMargin, bottomMargin);
+ container.setLayoutParams(params);
+ }
+
// OverlayViewController
@Override
@@ -204,7 +223,7 @@ public class NotificationPanelViewController extends OverlayPanelViewController
@Override
protected int getInsetTypesToFit() {
- return navigationBars();
+ return 0;
}
@Override