summaryrefslogtreecommitdiff
path: root/native/android/configuration.cpp
diff options
context:
space:
mode:
author Nicolo' Mazzucato <nicomazz@google.com> 2023-01-16 14:47:14 +0000
committer Nicolo' Mazzucato <nicomazz@google.com> 2023-01-17 12:57:58 +0000
commitd184e5ffa1d0099e4628398317a0383b1bf72176 (patch)
treee3c53b306cbb64a9e439a6bcc0a00fcf7409692c /native/android/configuration.cpp
parent9758d71bd98f32bdc9d036e0611dd7fa12f3fb40 (diff)
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
Diffstat (limited to 'native/android/configuration.cpp')
0 files changed, 0 insertions, 0 deletions