Fix missing notifs after restoring Overflow Bubbles
When you swipe away a notification in the shade and that notification has a restored Overflow Bubble, the shade does not update to fill the blank space. How does this happen: - ShadeListBuilder depends on BubbleCoordinator's NotifFilter to tell it which notifications to filter out - BubbleCoordinator checks BubbleController's CachedState to see which notifications to suppress - BubbleController's CachedState is not updated to suppress the Notification, because - Bubble #setSuppressNotification thinks that we should still display the Notif in the shade, because - In Bubble #showInShade always returned true, becase the #mIsClearable is set to false for all restored Overflow Bubbles Why doesn't it happen with Bubbles in the stack: - if a Bubble is in the Stack, we don't read its data from the Overflow Bubbles - after a restart, Bubbles in the Stack are freshly created from restored NotificationEntries in BubblesManager#mSysuiProxy#getShouldRestoredEntries - NotificationEntry#isDismissable is used to set BubbleEntry#isClearable here, which field is preserved This change - writes Bubble#mIsClearable to the bubble xml, so we won't have this problem with restoring Overflow Bubbles - fixes SparseArray comparison in BubbleXmlHelperTest and BubblePersistentRepositoryTest as previously we were not comparing values stored with the same key Fixes: 237897866 Test: have some Notifications which belongs to Overflow Bubbles (the max number of Bubbles is 5, if we receive more Notifs, the oldest Bubble will be pushed to the Overflow) => restart SystemUI with `adb shell am crash com.android.systemui` => swipe away shade notification for the chats => see that notifs below move up to fill blank space Test: atest BubbleXmlHelperTest BubblePersistentRepositoryTest Change-Id: I621b72a54db0034e4c66c69838bd266401c02f9b
Loading
Please register or sign in to comment