diff options
| author | 2019-11-18 19:08:35 +0000 | |
|---|---|---|
| committer | 2019-11-18 19:08:35 +0000 | |
| commit | c1e512c65d0c36d65b8825a4642ce200b5524e01 (patch) | |
| tree | e65d99eb8123f426e526d63249bdab457d949e3d | |
| parent | cbfe99ae3d3c788defa3bbd976b2c39b0af43da5 (diff) | |
| parent | 1d429ee4b883b8db8018dc89572b39762a10fbac (diff) | |
Merge "Changed NotificationViewController to be enabled when car service is ready."
| -rw-r--r-- | packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java | 28 |
1 files changed, 14 insertions, 14 deletions
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 4e5a3a633c3e..a12846adfa27 100644 --- a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +++ b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java @@ -560,13 +560,6 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt }); CarNotificationListener carNotificationListener = new CarNotificationListener(); mCarUxRestrictionManagerWrapper = new CarUxRestrictionManagerWrapper(); - mCarServiceProvider.addListener(car -> { - CarUxRestrictionsManager carUxRestrictionsManager = - (CarUxRestrictionsManager) - car.getCarManager(Car.CAR_UX_RESTRICTION_SERVICE); - mCarUxRestrictionManagerWrapper.setCarUxRestrictionsManager( - carUxRestrictionsManager); - }); mNotificationDataManager = new NotificationDataManager(); mNotificationDataManager.setOnUnseenCountUpdateListener( @@ -681,14 +674,21 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt return handled || isTracking; } }); + mCarServiceProvider.addListener(car -> { + CarUxRestrictionsManager carUxRestrictionsManager = + (CarUxRestrictionsManager) + car.getCarManager(Car.CAR_UX_RESTRICTION_SERVICE); + mCarUxRestrictionManagerWrapper.setCarUxRestrictionsManager( + carUxRestrictionsManager); - mNotificationViewController = new NotificationViewController( - mNotificationView, - PreprocessingManager.getInstance(mContext), - carNotificationListener, - mCarUxRestrictionManagerWrapper, - mNotificationDataManager); - mNotificationViewController.enable(); + mNotificationViewController = new NotificationViewController( + mNotificationView, + PreprocessingManager.getInstance(mContext), + carNotificationListener, + mCarUxRestrictionManagerWrapper, + mNotificationDataManager); + mNotificationViewController.enable(); + }); } /** |