Merge "CEC: Remove listener records only if they are currently used" into nyc-dev
diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java
index fed7e4b..e07d72f 100644
--- a/services/core/java/com/android/server/hdmi/HdmiControlService.java
+++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java
@@ -1189,7 +1189,9 @@
@Override
public void binderDied() {
synchronized (mLock) {
- mRecordListenerRecord = null;
+ if (mRecordListenerRecord == this) {
+ mRecordListenerRecord = null;
+ }
}
}
}
@@ -1813,7 +1815,9 @@
@Override
public void binderDied() {
synchronized (mLock) {
- mInputChangeListenerRecord = null;
+ if (mInputChangeListenerRecord == this) {
+ mInputChangeListenerRecord = null;
+ }
}
}
}