frameworks/base
Revision | d8389d36e512d19e5ac788cc19e15e55dc361e77 (tree) |
---|---|
Time | 2020-08-05 10:14:01 |
Author | Jing Ji <jji@goog...> |
Commiter | Vasyl Gello |
More fixes towards the race conditions in AMS
Bug: 142986887
Bug: 140108616
Test: Manual
Change-Id: I6e0bdc8c02bab54f6278096b3a3acadd97c064c6
Merged-In: I6e0bdc8c02bab54f6278096b3a3acadd97c064c6
(cherry picked from commit b2e84f0406139156442984943d8de7dd37d51368)
(cherry picked from commit 9f8923d54a2d3740d1a293728b1d5b5b2451627b)
@@ -300,7 +300,11 @@ class AppErrors { | ||
300 | 300 | // and then the delayed summary kill will be a no-op. |
301 | 301 | final ProcessRecord p = proc; |
302 | 302 | mService.mHandler.postDelayed( |
303 | - () -> killAppImmediateLocked(p, "forced", "killed for invalid state"), | |
303 | + () -> { | |
304 | + synchronized (mService) { | |
305 | + killAppImmediateLocked(p, "forced", "killed for invalid state"); | |
306 | + } | |
307 | + }, | |
304 | 308 | 5000L); |
305 | 309 | } |
306 | 310 | } |