Adding unfold latency tracking to DisplaySwitchLatencyTracker
Using current logic of DisplaySwitchLatencyTracker to track latency using LatencyTracker. Logic is also adjusted to exclude invalid cases when many fold/unfold events were emitted without finish event and it was measured as one very long display switch. This is done using cool-down mechanism: 1. When new start transition event is emitted before we managed to get finish event, we enter cool-down state (isCoolingDown field) 2. Cool-down lasts 2 seconds and is restarted for every new start or end event emitted while in cool-down, see startCoolDown method. 3. After cool-down times out, we are back to normal operation Old version of DisplaySwitchLatencyTracker is copied as NoCooldownDisplaySwitchLatencyTracker and will be used when unfold_latency_tracking_fix flag is off. Bug: 390649568 Test: DisplaySwitchLatencyTrackerTest Flag: com.android.systemui.unfold_latency_tracking_fix Change-Id: I8511fcea94fd234b690e56cce144412822095db9
Loading
Please register or sign in to comment