Merge "Refactor CarStatusBar to register listener after NotificationClickHanlderFactory instantiation."

This commit is contained in:
TreeHugger Robot
2019-06-19 00:58:34 +00:00
committed by Android (Google) Code Review

View File

@@ -425,14 +425,13 @@ public class CarStatusBar extends StatusBar implements
}
);
mNotificationClickHandlerFactory = new NotificationClickHandlerFactory(
mBarService,
launchResult -> {
if (launchResult == ActivityManager.START_TASK_TO_FRONT
|| launchResult == ActivityManager.START_SUCCESS) {
animateCollapsePanels();
}
});
mNotificationClickHandlerFactory = new NotificationClickHandlerFactory(mBarService);
mNotificationClickHandlerFactory.registerClickListener((launchResult, alertEntry) -> {
if (launchResult == ActivityManager.START_TASK_TO_FRONT
|| launchResult == ActivityManager.START_SUCCESS) {
animateCollapsePanels();
}
});
Car car = Car.createCar(mContext);
CarUxRestrictionsManager carUxRestrictionsManager = (CarUxRestrictionsManager)
car.getCarManager(Car.CAR_UX_RESTRICTION_SERVICE);