Loading packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +12 −9 Original line number Diff line number Diff line Loading @@ -563,7 +563,12 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt mCarUxRestrictionManagerWrapper = new CarUxRestrictionManagerWrapper(); mNotificationDataManager = new NotificationDataManager(); mNotificationDataManager.setOnUnseenCountUpdateListener(this::onUnseenCountUpdate); mNotificationDataManager.setOnUnseenCountUpdateListener(() -> { if (mNotificationDataManager != null) { onUseenCountUpdate(mNotificationDataManager.getUnseenNotificationCount()); } }); mEnableHeadsUpNotificationWhenNotificationShadeOpen = mContext.getResources().getBoolean( R.bool.config_enableHeadsUpNotificationWhenNotificationShadeOpen); Loading Loading @@ -685,16 +690,14 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt } /** * This method is called whenever there is an update to the number of unseen notifications. * This method can be extended by OEMs to customize the desired logic. * This method is automatically called whenever there is an update to the number of unseen * notifications. This method can be extended by OEMs to customize the desired logic. */ protected void onUnseenCountUpdate() { if (mNotificationDataManager != null) { boolean hasUnseen = mNotificationDataManager.getUnseenNotificationCount() > 0; protected void onUseenCountUpdate(int unseenNotificationCount) { boolean hasUnseen = unseenNotificationCount > 0; mCarNavigationBarController.toggleAllNotificationsUnseenIndicator( mDeviceProvisionedController.isCurrentUserSetup(), hasUnseen); } } /** * @return true if the notification panel is currently visible Loading Loading
packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +12 −9 Original line number Diff line number Diff line Loading @@ -563,7 +563,12 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt mCarUxRestrictionManagerWrapper = new CarUxRestrictionManagerWrapper(); mNotificationDataManager = new NotificationDataManager(); mNotificationDataManager.setOnUnseenCountUpdateListener(this::onUnseenCountUpdate); mNotificationDataManager.setOnUnseenCountUpdateListener(() -> { if (mNotificationDataManager != null) { onUseenCountUpdate(mNotificationDataManager.getUnseenNotificationCount()); } }); mEnableHeadsUpNotificationWhenNotificationShadeOpen = mContext.getResources().getBoolean( R.bool.config_enableHeadsUpNotificationWhenNotificationShadeOpen); Loading Loading @@ -685,16 +690,14 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt } /** * This method is called whenever there is an update to the number of unseen notifications. * This method can be extended by OEMs to customize the desired logic. * This method is automatically called whenever there is an update to the number of unseen * notifications. This method can be extended by OEMs to customize the desired logic. */ protected void onUnseenCountUpdate() { if (mNotificationDataManager != null) { boolean hasUnseen = mNotificationDataManager.getUnseenNotificationCount() > 0; protected void onUseenCountUpdate(int unseenNotificationCount) { boolean hasUnseen = unseenNotificationCount > 0; mCarNavigationBarController.toggleAllNotificationsUnseenIndicator( mDeviceProvisionedController.isCurrentUserSetup(), hasUnseen); } } /** * @return true if the notification panel is currently visible Loading