Avoid deadlocks updating WakeLock status in AM
The ActivityManagerService can acquire or release wake locks with the
ActivityManagerService locked. Now that the PowerManagerService
notifies it of wakelocks, this can cause a deadlock.
This patch removes the immediate oomAdj update, to avoid needing to
lock ActivityManagerService while being notified of WakeLock status.
This may cause delays in updating the oomAdj value, but should be
limited to leaving an app marked foreground longer than it should be.
Signed-off-by:
Christopher Lais <chris+android@zenthought.org>
Loading
Please register or sign in to comment