Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5f550c26 authored by Nick Chameyev's avatar Nick Chameyev
Browse files

Update scrims when changing quick settings clip, fix clipping bounds in split shade

Fixes two issues with scrims background:
  1) Scrims become transparent on pin code bouncer when
     rotating from split shade to non-split shade mode

     This happens because we update mClipQsScrim in ScrimState enum,
     but we don't actually re-apply alpha values and tints
     to the scrim views/drawables. We applied these values
     only when current ScrimState has changed (see transitionTo method).
     When we rotate the device when we are on pin code bouncer
     the state remains the same (BOUNCER), so we didn't apply
     these values.

     Updated the code to set alpha values and tints when
     setClipsQsScrim is called (it invokes applyAndDispatchState
     which invokes applyState).

  2) Background becomes black when we open pin code bouncer when using
     non-split shade mode and rotate the device to split shade mode

     It happened because in
     NotificationPanelViewController.setQSClippingBounds the clipping
     bounds are initialized with zeros and we didn't update
     them in case when we use split notification shade
     and qsPanelBottomY <= 0 (when quick settings are not visible).
     Empty bounds caused absence of the notifications
     scrim which should act as bouncer background.

     Fixed by using non-split shade logic for calculating bounds
     in this case, they cover the entire screen.

Fixes: 188112748
Test: atest com.android.systemui.statusbar.phone.ScrimControllerTest
Test: manual https://drive.google.com/drive/folders/1SRSzT0uQ-mETIVI87Ilr3dxlaUdcG9Go?usp=sharing
Change-Id: I783b2d4f4335447f7abfb210005aa09bfd3e15a8
parent ab202686
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment