Merge "Fixes 2 race conditions in MetricsLoggerService" into nyc-dev

This commit is contained in:
Hugo Benichi
2016-04-27 23:50:45 +00:00
committed by Android (Google) Code Review

View File

@@ -192,6 +192,7 @@ public class MetricsLoggerService extends SystemService {
} }
} }
synchronized (mPendingIntents) {
if (!mPendingIntents.isEmpty()) { if (!mPendingIntents.isEmpty()) {
pw.println(); pw.println();
pw.println("Pending intents:"); pw.println("Pending intents:");
@@ -199,6 +200,7 @@ public class MetricsLoggerService extends SystemService {
pw.println(pi.toString()); pw.println(pi.toString());
} }
} }
}
pw.println(); pw.println();
mDnsListener.dump(pw); mDnsListener.dump(pw);
@@ -327,9 +329,9 @@ public class MetricsLoggerService extends SystemService {
result[i++] = e; result[i++] = e;
} }
} }
}
reference.setValue(mLastEventReference); reference.setValue(mLastEventReference);
}
return result; return result;
} }