Loading packages/CarSystemUI/res/values-night/colors.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,9 @@ <color name="status_bar_background_color">#ff000000</color> <color name="status_bar_background_color">#ff000000</color> <color name="system_bar_background_opaque">#ff0c1013</color> <color name="system_bar_background_opaque">#ff0c1013</color> <!-- The background color of the notification shade --> <color name="notification_shade_background_color">#E0000000</color> <!-- The color of the ripples on the untinted notifications --> <!-- The color of the ripples on the untinted notifications --> <color name="notification_ripple_untinted_color">@color/ripple_material_dark</color> <color name="notification_ripple_untinted_color">@color/ripple_material_dark</color> </resources> </resources> packages/CarSystemUI/res/values/colors.xml +1 −1 Original line number Original line Diff line number Diff line Loading @@ -35,7 +35,7 @@ <drawable name="system_bar_background">@android:color/transparent</drawable> <drawable name="system_bar_background">@android:color/transparent</drawable> <!-- The background color of the notification shade --> <!-- The background color of the notification shade --> <color name="notification_shade_background_color">#DD000000</color> <color name="notification_shade_background_color">#D6000000</color> <!-- The background color of the car volume dialog --> <!-- The background color of the car volume dialog --> <color name="car_volume_dialog_background_color">@color/system_bar_background_opaque</color> <color name="car_volume_dialog_background_color">@color/system_bar_background_opaque</color> Loading packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +16 −0 Original line number Original line Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.car.drivingstate.CarDrivingStateEvent; import android.car.drivingstate.CarUxRestrictionsManager; import android.car.drivingstate.CarUxRestrictionsManager; import android.car.hardware.power.CarPowerManager.CarPowerStateListener; import android.car.hardware.power.CarPowerManager.CarPowerStateListener; import android.content.Context; import android.content.Context; import android.content.res.Configuration; import android.graphics.PixelFormat; import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable; Loading Loading @@ -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) { private void calculatePercentageFromBottom(float height) { if (mNotificationView.getHeight() > 0) { if (mNotificationView.getHeight() > 0) { mPercentageFromBottom = (int) Math.abs( mPercentageFromBottom = (int) Math.abs( Loading Loading
packages/CarSystemUI/res/values-night/colors.xml +3 −0 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,9 @@ <color name="status_bar_background_color">#ff000000</color> <color name="status_bar_background_color">#ff000000</color> <color name="system_bar_background_opaque">#ff0c1013</color> <color name="system_bar_background_opaque">#ff0c1013</color> <!-- The background color of the notification shade --> <color name="notification_shade_background_color">#E0000000</color> <!-- The color of the ripples on the untinted notifications --> <!-- The color of the ripples on the untinted notifications --> <color name="notification_ripple_untinted_color">@color/ripple_material_dark</color> <color name="notification_ripple_untinted_color">@color/ripple_material_dark</color> </resources> </resources>
packages/CarSystemUI/res/values/colors.xml +1 −1 Original line number Original line Diff line number Diff line Loading @@ -35,7 +35,7 @@ <drawable name="system_bar_background">@android:color/transparent</drawable> <drawable name="system_bar_background">@android:color/transparent</drawable> <!-- The background color of the notification shade --> <!-- The background color of the notification shade --> <color name="notification_shade_background_color">#DD000000</color> <color name="notification_shade_background_color">#D6000000</color> <!-- The background color of the car volume dialog --> <!-- The background color of the car volume dialog --> <color name="car_volume_dialog_background_color">@color/system_bar_background_opaque</color> <color name="car_volume_dialog_background_color">@color/system_bar_background_opaque</color> Loading
packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +16 −0 Original line number Original line Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.car.drivingstate.CarDrivingStateEvent; import android.car.drivingstate.CarUxRestrictionsManager; import android.car.drivingstate.CarUxRestrictionsManager; import android.car.hardware.power.CarPowerManager.CarPowerStateListener; import android.car.hardware.power.CarPowerManager.CarPowerStateListener; import android.content.Context; import android.content.Context; import android.content.res.Configuration; import android.graphics.PixelFormat; import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable; Loading Loading @@ -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) { private void calculatePercentageFromBottom(float height) { if (mNotificationView.getHeight() > 0) { if (mNotificationView.getHeight() > 0) { mPercentageFromBottom = (int) Math.abs( mPercentageFromBottom = (int) Math.abs( Loading