Fix bubbles taskbar scrim showing when notification panel is shown

TaskbarScrimViewController was previously unaware of visibility
changes that happened to taskbar outside of when the sysui state
flags changed. Additionally, isTaskbarVisibileAndNotStashing is not
a reliable signal as the visibility might be GONE even though taskbar
is about to animate to be visible (i.e. shade is showing and then
you swipe it back up -- taskbar scrim wouldn't appear because when
the sysuiStateFlags changed, taskbar visibility would still be 'gone'
at that point so the taskbar scrim wouldn't animate back when
the shade is swiped up).

To resolve this, I've added a callback to notify the scrim
controller of visibility changes and it'll update if needed.

Bug: 270634233
Test: manual - enable 3 button nav
             - have a bubble
             - go to overview
             - expand bubbles
             => observe that scrim appears over taskbar
             - swipe down shade
             => observe that scrim fades out
             - swipe shade up
             => observe that scrim fades in

Change-Id: Ibaae8efb90b4558d30795298570208a52b31efb4
This commit is contained in:
Mady Mellor
2023-09-08 15:31:03 -07:00
parent 9ea209b893
commit b898a3c8d3
4 changed files with 62 additions and 12 deletions

View File

@@ -194,6 +194,15 @@ public class TaskbarView extends FrameLayout implements FolderIcon.FolderIconPar
}
}
@Override
public void setVisibility(int visibility) {
boolean changed = getVisibility() != visibility;
super.setVisibility(visibility);
if (changed && mControllerCallbacks != null) {
mControllerCallbacks.notifyVisibilityChanged();
}
}
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();