一,frameworks/base / services/core/java/com/android/server/hdmi/HdmiControlService.java
void invokeInputChangeListener(HdmiDeviceInfo info) {
synchronized (mLock) {
try {
mInputChangeListenerRecord.mListener.onChanged(info);
/*int iCurrentSource = GetCurrentSourceInput();
int hdmiId = info.getPhysicalAddress() >> 12;
Slog.d(TAG, "iCurrentSource is " + iCurrentSource + ", hdmiId is " + hdmiId);
if(iCurrentSource == (hdmiId + 4)) {
Slog.d(TAG, "Not SetSourceInput, return");
return;
}
switch(hdmiId) {
case 1:
SetSourceInput(TvControlManager.SourceInput.HDMI1);
break;
case 2:
SetSourceInput(TvControlManager.SourceInput.HDMI2);
break;
case 3:
SetSourceInput(TvControlManager.SourceInput.HDMI3);
break;
}*/
} catch (Exception e) {
Slog.w(TAG, "Exception thrown by IHdmiInputChangeListener: " + e);
}
}
}
@ServiceThreadOnly
void updateActiveInput(int path, boolean notifyInputChange) {
assertRunOnServiceThread();
// Seq #15
setPrevPortId(getActivePortId());
setActivePath(path);