Merge "Fix HdmiCecLocalDevice concurrent access"

This commit is contained in:
Dan Zhang
2018-02-16 01:17:02 +00:00
committed by Gerrit Code Review

View File

@@ -660,7 +660,8 @@ abstract class HdmiCecLocalDevice {
@ServiceThreadOnly
void startQueuedActions() {
assertRunOnServiceThread();
for (HdmiCecFeatureAction action : mActions) {
// Use copied action list in that start() may remove itself.
for (HdmiCecFeatureAction action : new ArrayList<>(mActions)) {
if (!action.started()) {
Slog.i(TAG, "Starting queued action:" + action);
action.start();