Skip to content
Commit d184e5ff authored by Nicolo' Mazzucato's avatar Nicolo' Mazzucato
Browse files

Optimize DeviceFoldStateProvider#onHingeAngle

isClosingThresholdMet calculation turn out to cause some binder transaction to know if the current top task is home activity. As it is very rarely used, it is now moved to the last position of the AND chain.

Instead of querying ActivityManager each time, now a listener is registered for top task changes.

This removes many useless binder transactions (but adds a binder transaction when DeviceFoldStateProvider is initialized)

Test: DeviceFoldStateProviderTest
Bug: 265666399
Change-Id: I9b44d7409261882a3b72ad5d7f5eb44a2eb3c2b1
parent 9758d71b
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