am 03bdbca2: am 470b77b8: Merge "TIF: change input state based on the number of available streams" into lmp-mr1-dev
* commit '03bdbca2a9582691063585ce5fca11e6a33bdfaf': TIF: change input state based on the number of available streams
This commit is contained in:
@@ -188,6 +188,11 @@ class TvInputHardwareManager implements TvInputHal.Callback {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
connection.updateConfigsLocked(configs);
|
connection.updateConfigsLocked(configs);
|
||||||
|
String inputId = mHardwareInputIdMap.get(deviceId);
|
||||||
|
if (inputId != null) {
|
||||||
|
mHandler.obtainMessage(ListenerHandler.STATE_CHANGED,
|
||||||
|
convertConnectedToState(config.length > 0), 0, inputId).sendToTarget();
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
connection.getCallbackLocked().onStreamConfigChanged(configs);
|
connection.getCallbackLocked().onStreamConfigChanged(configs);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
@@ -257,6 +262,9 @@ class TvInputHardwareManager implements TvInputHal.Callback {
|
|||||||
mHardwareInputIdMap.put(deviceId, info.getId());
|
mHardwareInputIdMap.put(deviceId, info.getId());
|
||||||
mInputMap.put(info.getId(), info);
|
mInputMap.put(info.getId(), info);
|
||||||
|
|
||||||
|
// Process pending state changes
|
||||||
|
|
||||||
|
// For logical HDMI devices, they have information from HDMI CEC signals.
|
||||||
for (int i = 0; i < mHdmiStateMap.size(); ++i) {
|
for (int i = 0; i < mHdmiStateMap.size(); ++i) {
|
||||||
TvInputHardwareInfo hardwareInfo =
|
TvInputHardwareInfo hardwareInfo =
|
||||||
findHardwareInfoForHdmiPortLocked(mHdmiStateMap.keyAt(i));
|
findHardwareInfoForHdmiPortLocked(mHdmiStateMap.keyAt(i));
|
||||||
@@ -268,8 +276,17 @@ class TvInputHardwareManager implements TvInputHal.Callback {
|
|||||||
mHandler.obtainMessage(ListenerHandler.STATE_CHANGED,
|
mHandler.obtainMessage(ListenerHandler.STATE_CHANGED,
|
||||||
convertConnectedToState(mHdmiStateMap.valueAt(i)), 0,
|
convertConnectedToState(mHdmiStateMap.valueAt(i)), 0,
|
||||||
inputId).sendToTarget();
|
inputId).sendToTarget();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// For the rest of the devices, we can tell by the number of available streams.
|
||||||
|
Connection connection = mConnections.get(deviceId);
|
||||||
|
if (connection != null) {
|
||||||
|
mHandler.obtainMessage(ListenerHandler.STATE_CHANGED,
|
||||||
|
convertConnectedToState(connection.getConfigsLocked().length > 0), 0,
|
||||||
|
info.getId()).sendToTarget();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user