From daea9114e0da7bf7605c9cbbfbef1b7325fc47aa Mon Sep 17 00:00:00 2001 From: Adora Zhang Date: Thu, 11 Apr 2019 17:47:40 -0700 Subject: [PATCH] Reset notification list upon opening the drawer. Bug: 123433756 Test: manual Change-Id: I9a3bc6384854930904f13cef6962b97d9209b2c8 (cherry picked from commit 4025195c1d6e553b75bc0385d488cf8a3cf2c0be) --- .../com/android/systemui/statusbar/car/CarStatusBar.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 835cedf9cdd98..f5dab01d1b09d 100644 --- a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +++ b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java @@ -131,6 +131,8 @@ public class CarStatusBar extends StatusBar implements // The container for the notifications. private CarNotificationView mNotificationView; private RecyclerView mNotificationList; + // The controller for the notification view. + private NotificationViewController mNotificationViewController; // The state of if the notification list is currently showing the bottom. private boolean mNotificationListAtBottom; // Was the notification list at the bottom when the user first touched the screen @@ -544,7 +546,7 @@ public class CarStatusBar extends StatusBar implements } }); - NotificationViewController mNotificationViewController = new NotificationViewController( + mNotificationViewController = new NotificationViewController( mNotificationView, PreprocessingManager.getInstance(mContext), carNotificationListener, @@ -651,9 +653,11 @@ public class CarStatusBar extends StatusBar implements mStatusBarWindowController.setPanelVisible(false); mNotificationView.setVisibility(View.INVISIBLE); mNotificationList.setClipBounds(null); + mNotificationViewController.setIsInForeground(false); // let the status bar know that the panel is closed setPanelExpanded(false); } else { + mNotificationViewController.setIsInForeground(true); // let the status bar know that the panel is open mNotificationView.setVisibleNotificationsAsSeen(); setPanelExpanded(true);