summaryrefslogtreecommitdiff
path: root/libs/input/PointerController.cpp
diff options
context:
space:
mode:
author Garfield Tan <xutan@google.com> 2024-09-20 14:19:50 -0700
committer Garfield Tan <xutan@google.com> 2024-09-24 08:59:49 -0700
commit1c9612e68a4dff82f267027d74feb74a2bf98ba2 (patch)
treeff92b550ebbcd42b629df44a6d35f32cf631d943 /libs/input/PointerController.cpp
parentb28bcb6ed131708a12c517dd73fbb2f4c2241431 (diff)
Use a one-off thread to load launch params
It isn't possible to reuse LazyTaskWriterThread in PersisterQueue. Code in that thread needs to obtain the WM lock, while it is possible for getLaunchParams() to wait for the loading task with the WM lock held in a different thread. That's a recipe for deadlocks. It is also unsafe to use other shared background threads, because we don't control what they do in them either. That means we have to use a new thread to load launch params. There are two options in front of us: 1. Create a thread every time we need to load launch params, and tear it down after the loading is done. 2. Introduce a long-standing thread to load launch params. In this case it is also optional to move all writing of launch params to this thread. I chose #1 because I don't think loading launch params is frequent enough to introduce a new long-standing thread in system_server. Bug: 365983567 Test: atest LaunchParamsPersisterTests Test: Settings launches at correct location after reboot. Flag: EXEMPT bug fix Change-Id: I613ba79b03db1b6ec25596d5a0cdbf03d65ce9d9
Diffstat (limited to 'libs/input/PointerController.cpp')
0 files changed, 0 insertions, 0 deletions