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

Skip to content
Commit 0e0daefa authored by Michal Brzezinski's avatar Michal Brzezinski Committed by Michał Brzeziński
Browse files

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
parent 9d2b66a8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment