AOD: Fix more flickering

Fixes an issue where waking up with fingerprint would not work correctly
if the keyguard was not locked.

Also fixes flickering when triggering the Assistant on AOD.

To achieve the above, also ensures that whenever the scrim is visible, the status bar window is expanded.

Finally, log the alpha and tint of the scrims to systrace.

Fixes: 63983663
Fixes: 63065774
Bug: 63531607
Test: Disable power key locks immediately, trigger AOD, unlock with fingerprint. Verify no flicker; Trigger Assistant from AOD in various scenarios. Verify no flicker.

Change-Id: I0db2938afdde23c1995f6ac905d4a6abdf25cdec
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java b/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java
index 5237244..0c067ff 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIFactory.java
@@ -40,6 +40,8 @@
 import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
 import com.android.systemui.volume.VolumeDialogControllerImpl;
 
+import java.util.function.Consumer;
+
 /**
  * Class factory to provide customizable SystemUI components.
  */
@@ -84,8 +86,10 @@
 
     public ScrimController createScrimController(LightBarController lightBarController,
             ScrimView scrimBehind, ScrimView scrimInFront, View headsUpScrim,
-            LockscreenWallpaper lockscreenWallpaper) {
-        return new ScrimController(lightBarController, scrimBehind, scrimInFront, headsUpScrim);
+            LockscreenWallpaper lockscreenWallpaper,
+            Consumer<Boolean> scrimVisibleListener) {
+        return new ScrimController(lightBarController, scrimBehind, scrimInFront, headsUpScrim,
+                scrimVisibleListener);
     }
 
     public NotificationIconAreaController createNotificationIconAreaController(Context context,