}
}
+ @ServiceThreadOnly
+ protected boolean handleUserControlPressed(HdmiCecMessage message) {
+ assertRunOnServiceThread();
+ wakeUpIfActiveSource();
+ return super.handleUserControlPressed(message);
+ }
+
@Override
@ServiceThreadOnly
protected boolean handleSetStreamPath(HdmiCecMessage message) {
}
private void wakeUpIfActiveSource() {
- if (mIsActiveSource && mService.isPowerStandbyOrTransient()) {
+ if (!mIsActiveSource) {
+ return;
+ }
+ // Wake up the device if the power is in standby mode, or its screen is off -
+ // which can happen if the device is holding a partial lock.
+ if (mService.isPowerStandbyOrTransient() || !mService.getPowerManager().isScreenOn()) {
mService.wakeUp();
}
}