Run the ondrawn Keyguard callback in the bg thread
This should give some unfold latency improvements, as the screen is on only when the pending tasks registered in ScreenOnCoordinator are completed.
If there are some long running computations in the main thread, calling onDrawn.run() will result in delays.
Flag: ACONFIG enable_background_keyguard_ondrawn_callback DISABLED
Bug: 295873557
Test: ScreenOnCoordinatorTest
Change-Id: Ie0202eb96d7b155f0f3be90dc35a3b0ae9b8e8e3
diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig
index 41d12dc..b1b7902 100644
--- a/packages/SystemUI/aconfig/systemui.aconfig
+++ b/packages/SystemUI/aconfig/systemui.aconfig
@@ -145,6 +145,16 @@
}
flag {
+ name: "enable_background_keyguard_ondrawn_callback"
+ namespace: "systemui"
+ description: "Calls the onDrawn keyguard in the background, without being blocked by main"
+ "thread work. This results in the screen to turn on earlier when the main thread is stuck. "
+ "Note that, even after this callback is called, we're waiting for all windows to finish "
+ " drawing."
+ bug: "295873557"
+}
+
+flag {
name: "qs_new_pipeline"
namespace: "systemui"
description: "Use the new pipeline for Quick Settings. Should have no behavior changes."