Loading packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +24 −18 Original line number Diff line number Diff line Loading @@ -546,24 +546,7 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt mCarUxRestrictionManagerWrapper = new CarUxRestrictionManagerWrapper(); mNotificationDataManager = new NotificationDataManager(); mNotificationDataManager.setOnUnseenCountUpdateListener( () -> { if (mNavigationBarView != null && mNotificationDataManager != null) { Boolean hasUnseen = mNotificationDataManager.getUnseenNotificationCount() > 0; if (mNavigationBarView != null) { mNavigationBarView.toggleNotificationUnseenIndicator(hasUnseen); } if (mLeftNavigationBarView != null) { mLeftNavigationBarView.toggleNotificationUnseenIndicator(hasUnseen); } if (mRightNavigationBarView != null) { mRightNavigationBarView.toggleNotificationUnseenIndicator(hasUnseen); } } }); mNotificationDataManager.setOnUnseenCountUpdateListener(this::onUnseenCountUpdate); mEnableHeadsUpNotificationWhenNotificationShadeOpen = mContext.getResources().getBoolean( R.bool.config_enableHeadsUpNotificationWhenNotificationShadeOpen); Loading Loading @@ -688,6 +671,29 @@ 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. */ protected void onUnseenCountUpdate() { if (mNavigationBarView != null && mNotificationDataManager != null) { Boolean hasUnseen = mNotificationDataManager.getUnseenNotificationCount() > 0; if (mNavigationBarView != null) { mNavigationBarView.toggleNotificationUnseenIndicator(hasUnseen); } if (mLeftNavigationBarView != null) { mLeftNavigationBarView.toggleNotificationUnseenIndicator(hasUnseen); } if (mRightNavigationBarView != null) { mRightNavigationBarView.toggleNotificationUnseenIndicator(hasUnseen); } } } /** * @return true if the notification panel is currently visible */ Loading Loading
packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +24 −18 Original line number Diff line number Diff line Loading @@ -546,24 +546,7 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt mCarUxRestrictionManagerWrapper = new CarUxRestrictionManagerWrapper(); mNotificationDataManager = new NotificationDataManager(); mNotificationDataManager.setOnUnseenCountUpdateListener( () -> { if (mNavigationBarView != null && mNotificationDataManager != null) { Boolean hasUnseen = mNotificationDataManager.getUnseenNotificationCount() > 0; if (mNavigationBarView != null) { mNavigationBarView.toggleNotificationUnseenIndicator(hasUnseen); } if (mLeftNavigationBarView != null) { mLeftNavigationBarView.toggleNotificationUnseenIndicator(hasUnseen); } if (mRightNavigationBarView != null) { mRightNavigationBarView.toggleNotificationUnseenIndicator(hasUnseen); } } }); mNotificationDataManager.setOnUnseenCountUpdateListener(this::onUnseenCountUpdate); mEnableHeadsUpNotificationWhenNotificationShadeOpen = mContext.getResources().getBoolean( R.bool.config_enableHeadsUpNotificationWhenNotificationShadeOpen); Loading Loading @@ -688,6 +671,29 @@ 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. */ protected void onUnseenCountUpdate() { if (mNavigationBarView != null && mNotificationDataManager != null) { Boolean hasUnseen = mNotificationDataManager.getUnseenNotificationCount() > 0; if (mNavigationBarView != null) { mNavigationBarView.toggleNotificationUnseenIndicator(hasUnseen); } if (mLeftNavigationBarView != null) { mLeftNavigationBarView.toggleNotificationUnseenIndicator(hasUnseen); } if (mRightNavigationBarView != null) { mRightNavigationBarView.toggleNotificationUnseenIndicator(hasUnseen); } } } /** * @return true if the notification panel is currently visible */ Loading