Commit Graph

3 Commits

Author SHA1 Message Date
Wei Wang
442a23d628 make InteractionHandler thread safe
InteractionHandler calls undo_hint_action in a separate thread, where
undo_hint_action manipulates a linklist which is not protected by any
locking method.

std::lock_guard<std::mutex> lk(mLock) protects insides
InteractionHandler class, but the linklist is also used in other places
of PowerHAL such as Encoder hint.

Bug: 71383315
Test: Build
Change-Id: I81e2c79ab78ed7bd13ddc663ddbe86fa08f29337
2017-12-28 10:22:18 -08:00
Adrian Salido
a09dac5dad Power: Fix interaction boost calculation
Interaction handler has a check to ignore duplicate interaction requests
if previous covers current one. However the previous request could
finish early if idle is detected, need to account for this condition.

Bug: 63116225
Change-Id: I1a128eb8fe3c2a3daa7f48bc73cd5f07d5b1ae5b
2017-07-11 14:02:30 -07:00
Adrian Salido
668cac2f4c power: remove interaction lock when idle
Allows earlier interaction lock release by polling on display updates to
stop happening (becomes idle) for a programmable amount of time.

Bug: 62110101
Test: Ran UiBench, didn't see regressions
susbset of tests - avg-jank:
testInflatingListViewFling: 0.09
testTrivialListViewFling:   0.15

Change-Id: I83c0fc75a3d7ca5bf76910ebbaeddb69343a7ee2
2017-06-21 16:13:24 -07:00