Loading packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarFacetButton.java +2 −4 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ public class CarFacetButton extends LinearLayout { mComponentNames = componentNameString.split(FACET_FILTER_DELIMITER); } intent.putExtra(EXTRA_FACET_LAUNCH_PICKER, mSelected); setOnClickListener(getButtonClickListener(intent)); if (longPressIntentString != null) { Loading @@ -124,10 +125,7 @@ public class CarFacetButton extends LinearLayout { /** Defines the behavior of a button click. */ protected OnClickListener getButtonClickListener(Intent toSend) { return v -> { toSend.putExtra(EXTRA_FACET_LAUNCH_PICKER, mSelected); mContext.startActivityAsUser(toSend, UserHandle.CURRENT); }; return v -> mContext.startActivityAsUser(toSend, UserHandle.CURRENT); } /** Defines the behavior of a long click. */ Loading packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +22 −16 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.inputmethodservice.InputMethodService; import android.media.AudioManager; import android.os.Build; import android.os.Handler; import android.os.IBinder; import android.os.Looper; Loading Loading @@ -106,6 +107,7 @@ import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.statusbar.policy.KeyguardMonitor; import com.android.systemui.statusbar.policy.NetworkController; import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.statusbar.policy.ZenModeController; import com.android.systemui.volume.VolumeUI; Loading Loading @@ -389,6 +391,9 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt // Policy mZenController = Dependency.get(ZenModeController.class); if (Build.IS_USERDEBUG) { mNetworkController = Dependency.get(NetworkController.class); } // Icon mIconController = Dependency.get(StatusBarIconController.class); Loading Loading @@ -642,7 +647,11 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt mCarUxRestrictionManagerWrapper = new CarUxRestrictionManagerWrapper(); mNotificationDataManager = new NotificationDataManager(); mNotificationDataManager.setOnUnseenCountUpdateListener(this::onUnseenCountUpdate); mNotificationDataManager.setOnUnseenCountUpdateListener(() -> { if (mNavigationBarView != null && mNotificationDataManager != null) { onUseenCountUpdate(mNotificationDataManager.getUnseenNotificationCount()); } }); mEnableHeadsUpNotificationWhenNotificationShadeOpen = mContext.getResources().getBoolean( R.bool.config_enableHeadsUpNotificationWhenNotificationShadeOpen); Loading Loading @@ -768,13 +777,11 @@ 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 (mNavigationBarView != null && mNotificationDataManager != null) { Boolean hasUnseen = mNotificationDataManager.getUnseenNotificationCount() > 0; protected void onUseenCountUpdate(int unseenNotificationCount) { boolean hasUnseen = unseenNotificationCount > 0; if (mNavigationBarView != null) { mNavigationBarView.toggleNotificationUnseenIndicator(hasUnseen); Loading @@ -788,7 +795,6 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt mRightNavigationBarView.toggleNotificationUnseenIndicator(hasUnseen); } } } /** * @return true if the notification panel is currently visible Loading Loading
packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarFacetButton.java +2 −4 Original line number Diff line number Diff line Loading @@ -110,6 +110,7 @@ public class CarFacetButton extends LinearLayout { mComponentNames = componentNameString.split(FACET_FILTER_DELIMITER); } intent.putExtra(EXTRA_FACET_LAUNCH_PICKER, mSelected); setOnClickListener(getButtonClickListener(intent)); if (longPressIntentString != null) { Loading @@ -124,10 +125,7 @@ public class CarFacetButton extends LinearLayout { /** Defines the behavior of a button click. */ protected OnClickListener getButtonClickListener(Intent toSend) { return v -> { toSend.putExtra(EXTRA_FACET_LAUNCH_PICKER, mSelected); mContext.startActivityAsUser(toSend, UserHandle.CURRENT); }; return v -> mContext.startActivityAsUser(toSend, UserHandle.CURRENT); } /** Defines the behavior of a long click. */ Loading
packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +22 −16 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.inputmethodservice.InputMethodService; import android.media.AudioManager; import android.os.Build; import android.os.Handler; import android.os.IBinder; import android.os.Looper; Loading Loading @@ -106,6 +107,7 @@ import com.android.systemui.statusbar.phone.StatusBarIconController; import com.android.systemui.statusbar.policy.BatteryController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; import com.android.systemui.statusbar.policy.KeyguardMonitor; import com.android.systemui.statusbar.policy.NetworkController; import com.android.systemui.statusbar.policy.UserSwitcherController; import com.android.systemui.statusbar.policy.ZenModeController; import com.android.systemui.volume.VolumeUI; Loading Loading @@ -389,6 +391,9 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt // Policy mZenController = Dependency.get(ZenModeController.class); if (Build.IS_USERDEBUG) { mNetworkController = Dependency.get(NetworkController.class); } // Icon mIconController = Dependency.get(StatusBarIconController.class); Loading Loading @@ -642,7 +647,11 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt mCarUxRestrictionManagerWrapper = new CarUxRestrictionManagerWrapper(); mNotificationDataManager = new NotificationDataManager(); mNotificationDataManager.setOnUnseenCountUpdateListener(this::onUnseenCountUpdate); mNotificationDataManager.setOnUnseenCountUpdateListener(() -> { if (mNavigationBarView != null && mNotificationDataManager != null) { onUseenCountUpdate(mNotificationDataManager.getUnseenNotificationCount()); } }); mEnableHeadsUpNotificationWhenNotificationShadeOpen = mContext.getResources().getBoolean( R.bool.config_enableHeadsUpNotificationWhenNotificationShadeOpen); Loading Loading @@ -768,13 +777,11 @@ 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 (mNavigationBarView != null && mNotificationDataManager != null) { Boolean hasUnseen = mNotificationDataManager.getUnseenNotificationCount() > 0; protected void onUseenCountUpdate(int unseenNotificationCount) { boolean hasUnseen = unseenNotificationCount > 0; if (mNavigationBarView != null) { mNavigationBarView.toggleNotificationUnseenIndicator(hasUnseen); Loading @@ -788,7 +795,6 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt mRightNavigationBarView.toggleNotificationUnseenIndicator(hasUnseen); } } } /** * @return true if the notification panel is currently visible Loading