More fixes towards the race conditions in AMS

Bug: 142986887
Bug: 140108616
Test: Manual
Change-Id: I6e0bdc8c02bab54f6278096b3a3acadd97c064c6
Merged-In: I6e0bdc8c02bab54f6278096b3a3acadd97c064c6
(cherry picked from commit b2e84f0406)
This commit is contained in:
Jing Ji
2019-10-25 12:03:30 -07:00
committed by Chris Tate
parent b1ae5fd443
commit 9450069de9

View File

@@ -312,7 +312,11 @@ class AppErrors {
// and then the delayed summary kill will be a no-op. // and then the delayed summary kill will be a no-op.
final ProcessRecord p = proc; final ProcessRecord p = proc;
mService.mHandler.postDelayed( mService.mHandler.postDelayed(
() -> killAppImmediateLocked(p, "forced", "killed for invalid state"), () -> {
synchronized (mService) {
killAppImmediateLocked(p, "forced", "killed for invalid state");
}
},
5000L); 5000L);
} }
} }