OSDN Git Service

Added missing mGlobalLock in system server
authorchaviw <chaviw@google.com>
Fri, 14 Jun 2019 23:41:17 +0000 (16:41 -0700)
committerchaviw <chaviw@google.com>
Sat, 15 Jun 2019 00:02:16 +0000 (17:02 -0700)
commita13051f2141aff4df6398a51ef349fb2327986e0
treef76a610bd1a9911d819c0b5b421e4a974f4e229d
parent9bffff9528c66562ed01e86b63c883cab98f654b
Added missing mGlobalLock in system server

The method resetFreezeTaskListReorderingOnTimeout is posted onto a
handler so it loses mGlobalLock. Reacquire the lock when the runnable is
invoked. Without the lock, the code enters very critical code unlocked,
causing race conditions.

Fixes: 135016269
Test: Hard to repro, go/wm-smoke
Change-Id: Iafccc466c1aa22ff6f528e99e68a672e0dc50975
services/core/java/com/android/server/wm/RecentTasks.java