Only collapse stack on shade state change
Fixes an issue with bubble not being expanded when notification was set
to be expanded from lock screen.
Setting a notification to bubble from the notification action will add
it as a new entry in BubbleData. And that bubble will be set to
auto-expand.
When a device is locked, BubbleController receives a status bar state
change with isShade=false.
When a device is unlocked, BubbleController can receive duplicate status
bar state changes with isShade=false and will finally receive an update
with isShade=true. The isShade=true indicates device is unlocked.
Ensure that multiple duplicate status bar state changes to false do not
try to re-collapse the stack. As this would clear the expanded state for
bubbles that were updated while device was locked.
Bug: 260652751
Test: atest BubblesTest
Test: manual:
1. have a notification that is not a bubble
2. have pattern lock set and lock device
3. mark notification to be a bubble from lock screen
4. unlock device
5. observe bubble is added and expanded
6. lock device and unlock device again
7. observe stack is now collapsed
Change-Id: Ie0fdbbb3cb95c0720a00e7e25deaeb438cc51df3
3 files changed