Java Examples for android.hardware.hdmi.HdmiControlManager.POWER_STATUS_UNKNOWN
The following java examples will help you to understand the usage of android.hardware.hdmi.HdmiControlManager.POWER_STATUS_UNKNOWN. These source code samples are taken from different open source projects.
Example 1
| Project: platform_frameworks_base-master File: PowerStatusMonitorAction.java View source code |
private void queryPowerStatus() {
List<HdmiDeviceInfo> deviceInfos = tv().getDeviceInfoList(false);
resetPowerStatus(deviceInfos);
for (HdmiDeviceInfo info : deviceInfos) {
final int logicalAddress = info.getLogicalAddress();
sendCommand(HdmiCecMessageBuilder.buildGiveDevicePowerStatus(getSourceAddress(), logicalAddress), new SendMessageCallback() {
@Override
public void onSendCompleted(int error) {
// update power status into UNKNOWN.
if (error != Constants.SEND_RESULT_SUCCESS) {
updatePowerStatus(logicalAddress, POWER_STATUS_UNKNOWN, true);
}
}
});
}
mState = STATE_WAIT_FOR_REPORT_POWER_STATUS;
// Add both timers, monitoring and timeout.
addTimer(STATE_WAIT_FOR_NEXT_MONITORING, MONITIROING_INTERNAL_MS);
addTimer(STATE_WAIT_FOR_REPORT_POWER_STATUS, REPORT_POWER_STATUS_TIMEOUT_MS);
}Example 2
| Project: android_frameworks_base-master File: PowerStatusMonitorAction.java View source code |
private void queryPowerStatus() {
List<HdmiDeviceInfo> deviceInfos = tv().getDeviceInfoList(false);
resetPowerStatus(deviceInfos);
for (HdmiDeviceInfo info : deviceInfos) {
final int logicalAddress = info.getLogicalAddress();
sendCommand(HdmiCecMessageBuilder.buildGiveDevicePowerStatus(getSourceAddress(), logicalAddress), new SendMessageCallback() {
@Override
public void onSendCompleted(int error) {
// update power status into UNKNOWN.
if (error != Constants.SEND_RESULT_SUCCESS) {
updatePowerStatus(logicalAddress, POWER_STATUS_UNKNOWN, true);
}
}
});
}
mState = STATE_WAIT_FOR_REPORT_POWER_STATUS;
// Add both timers, monitoring and timeout.
addTimer(STATE_WAIT_FOR_NEXT_MONITORING, MONITIROING_INTERNAL_MS);
addTimer(STATE_WAIT_FOR_REPORT_POWER_STATUS, REPORT_POWER_STATUS_TIMEOUT_MS);
}Example 3
| Project: android-sdk-sources-for-api-level-23-master File: PowerStatusMonitorAction.java View source code |
private void queryPowerStatus() {
List<HdmiDeviceInfo> deviceInfos = tv().getDeviceInfoList(false);
resetPowerStatus(deviceInfos);
for (HdmiDeviceInfo info : deviceInfos) {
final int logicalAddress = info.getLogicalAddress();
sendCommand(HdmiCecMessageBuilder.buildGiveDevicePowerStatus(getSourceAddress(), logicalAddress), new SendMessageCallback() {
@Override
public void onSendCompleted(int error) {
// update power status into UNKNOWN.
if (error != Constants.SEND_RESULT_SUCCESS) {
updatePowerStatus(logicalAddress, POWER_STATUS_UNKNOWN, true);
}
}
});
}
mState = STATE_WAIT_FOR_REPORT_POWER_STATUS;
// Add both timers, monitoring and timeout.
addTimer(STATE_WAIT_FOR_NEXT_MONITORING, MONITIROING_INTERNAL_MS);
addTimer(STATE_WAIT_FOR_REPORT_POWER_STATUS, REPORT_POWER_STATUS_TIMEOUT_MS);
}