Reset the notification expanded states on screen off
To avoid having expanded notifications sticking around Bug: 16005498 Change-Id: Ib5b184fa7eb67ada85305e7ca4afad68a1514327
This commit is contained in:
@@ -150,6 +150,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView {
|
||||
logExpansionEvent(true, wasExpanded);
|
||||
}
|
||||
|
||||
public void resetUserExpansion() {
|
||||
mHasUserChangedExpansion = false;
|
||||
mUserExpanded = false;
|
||||
}
|
||||
|
||||
public boolean isUserLocked() {
|
||||
return mUserLocked;
|
||||
}
|
||||
|
||||
@@ -113,7 +113,6 @@ import com.android.systemui.R;
|
||||
import com.android.systemui.doze.DozeService;
|
||||
import com.android.systemui.keyguard.KeyguardViewMediator;
|
||||
import com.android.systemui.qs.QSPanel;
|
||||
import com.android.systemui.qs.QSTile;
|
||||
import com.android.systemui.statusbar.ActivatableNotificationView;
|
||||
import com.android.systemui.statusbar.BaseStatusBar;
|
||||
import com.android.systemui.statusbar.CommandQueue;
|
||||
@@ -2923,6 +2922,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
notifyHeadsUpScreenOn(false);
|
||||
finishBarAnimations();
|
||||
stopNotificationLogging();
|
||||
resetUserExpandedStates();
|
||||
}
|
||||
else if (Intent.ACTION_SCREEN_ON.equals(action)) {
|
||||
mScreenOn = true;
|
||||
@@ -2951,6 +2951,17 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
|
||||
}
|
||||
};
|
||||
|
||||
private void resetUserExpandedStates() {
|
||||
ArrayList<Entry> activeNotifications = mNotificationData.getActiveNotifications();
|
||||
final int notificationCount = activeNotifications.size();
|
||||
for (int i = 0; i < notificationCount; i++) {
|
||||
NotificationData.Entry entry = activeNotifications.get(i);
|
||||
if (entry.row != null) {
|
||||
entry.row.resetUserExpansion();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dismissKeyguardThenExecute(final OnDismissAction action) {
|
||||
if (mStatusBarKeyguardViewManager.isShowing()) {
|
||||
|
||||
Reference in New Issue
Block a user