Atom: initPortInfo when receive hotplug from tx for audiosystem device[1/3]
ag/5190487 BUG=115782816, 113608041 PD# 174288 Test: local tested Change-Id: I7bfdcbaf28dbe7cf9538c0eadbf751b376fb8404 (cherry picked from https://partner-android-review.git.corp.google.com/c/platform/frameworks/base/+/1152062)
This commit is contained in:
@@ -270,7 +270,6 @@ public class SettingsBackupTest {
|
||||
Settings.Global.GNSS_SATELLITE_BLACKLIST,
|
||||
Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS,
|
||||
Settings.Global.HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED,
|
||||
Settings.Global.HDMI_CONTROL_AUTO_TV_OFF_ENABLED,
|
||||
Settings.Global.HDMI_CONTROL_AUTO_WAKEUP_ENABLED,
|
||||
Settings.Global.HDMI_CONTROL_ENABLED,
|
||||
Settings.Global.HDMI_SYSTEM_AUDIO_CONTROL_ENABLED,
|
||||
|
||||
@@ -1008,6 +1008,10 @@ public class HdmiControlService extends SystemService {
|
||||
assertRunOnServiceThread();
|
||||
|
||||
if (connected && !isTvDevice()) {
|
||||
if (getPortInfo(portId).getType() == HdmiPortInfo.PORT_OUTPUT && isSwitchDevice()) {
|
||||
initPortInfo();
|
||||
HdmiLogger.debug("initPortInfo for switch device when onHotplug from tx.");
|
||||
}
|
||||
ArrayList<HdmiCecLocalDevice> localDevices = new ArrayList<>();
|
||||
for (int type : mLocalDevices) {
|
||||
if (type == HdmiDeviceInfo.DEVICE_PLAYBACK
|
||||
@@ -2124,6 +2128,11 @@ public class HdmiControlService extends SystemService {
|
||||
return mLocalDevices.contains(HdmiDeviceInfo.DEVICE_PLAYBACK);
|
||||
}
|
||||
|
||||
boolean isSwitchDevice() {
|
||||
return SystemProperties.getBoolean(
|
||||
Constants.PROPERTY_HDMI_IS_DEVICE_HDMI_CEC_SWITCH, false);
|
||||
}
|
||||
|
||||
boolean isTvDeviceEnabled() {
|
||||
return isTvDevice() && tv() != null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user