CEC: Let arc termination start before standby
Bug: 19930352
Change-Id: Ie344f06a66beafecf64eccadc1881c4d2ec170b3
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
index d17e9b3..d0c8202 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevice.java
@@ -636,7 +636,7 @@
void addAndStartAction(final HdmiCecFeatureAction action) {
assertRunOnServiceThread();
mActions.add(action);
- if (mService.isPowerStandbyOrTransient()) {
+ if (mService.isPowerStandby()) {
Slog.i(TAG, "Not ready to start action. Queued for deferred start:" + action);
return;
}
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
index d5cb5e3..83537d8 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
@@ -1572,7 +1572,6 @@
@Override
@ServiceThreadOnly
protected void disableDevice(boolean initiatedByCec, PendingActionClearedCallback callback) {
- super.disableDevice(initiatedByCec, callback);
assertRunOnServiceThread();
mService.unregisterTvInputCallback(mTvInputCallback);
// Remove any repeated working actions.
@@ -1588,6 +1587,8 @@
disableSystemAudioIfExist();
disableArcIfExist();
+
+ super.disableDevice(initiatedByCec, callback);
clearDeviceInfoList();
checkIfPendingActionsCleared();
}