Merge "Fix NullPointerException in PhantomProcessList due to race condition" into sc-dev

This commit is contained in:
Jing Ji
2021-07-29 08:19:11 +00:00
committed by Android (Google) Code Review

View File

@@ -365,6 +365,9 @@ public final class PhantomProcessList {
private int onPhantomProcessFdEvent(FileDescriptor fd, int events) {
synchronized (mLock) {
final PhantomProcessRecord proc = mPhantomProcessesPidFds.get(fd.getInt$());
if (proc == null) {
return 0;
}
if ((events & EVENT_INPUT) != 0) {
proc.onProcDied(true);
} else {