diff --git a/packages/CarSystemUI/res/values-night/colors.xml b/packages/CarSystemUI/res/values-night/colors.xml index dad94a894603e..a2edd7dc5b4e6 100644 --- a/packages/CarSystemUI/res/values-night/colors.xml +++ b/packages/CarSystemUI/res/values-night/colors.xml @@ -19,6 +19,9 @@ #ff000000 #ff0c1013 + + #E0000000 + @color/ripple_material_dark diff --git a/packages/CarSystemUI/res/values/colors.xml b/packages/CarSystemUI/res/values/colors.xml index e13c94052281d..e0ae456623909 100644 --- a/packages/CarSystemUI/res/values/colors.xml +++ b/packages/CarSystemUI/res/values/colors.xml @@ -35,7 +35,7 @@ @android:color/transparent - #DD000000 + #D6000000 @color/system_bar_background_opaque diff --git a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java index 812adf94b8bc5..71b9dc3e923fc 100644 --- a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +++ b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java @@ -27,6 +27,7 @@ import android.car.drivingstate.CarDrivingStateEvent; import android.car.drivingstate.CarUxRestrictionsManager; import android.car.hardware.power.CarPowerManager.CarPowerStateListener; import android.content.Context; +import android.content.res.Configuration; import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.drawable.Drawable; @@ -1078,6 +1079,21 @@ public class CarStatusBar extends StatusBar implements } } + @Override + public void onConfigChanged(Configuration newConfig) { + super.onConfigChanged(newConfig); + + int uiModeNightMask = (newConfig.uiMode & Configuration.UI_MODE_NIGHT_MASK); + + boolean dayNightModeChanged = uiModeNightMask == Configuration.UI_MODE_NIGHT_YES + || uiModeNightMask == Configuration.UI_MODE_NIGHT_NO; + + if (dayNightModeChanged) { + mNotificationView.setBackgroundColor( + mContext.getColor(R.color.notification_shade_background_color)); + } + } + private void calculatePercentageFromBottom(float height) { if (mNotificationView.getHeight() > 0) { mPercentageFromBottom = (int) Math.abs(