Loading services/core/java/com/android/server/hdmi/HdmiControlService.java +9 −2 Original line number Original line Diff line number Diff line Loading @@ -1392,11 +1392,15 @@ public class HdmiControlService extends SystemService { } } @Override @Override @Nullable public HdmiDeviceInfo getActiveSource() { public HdmiDeviceInfo getActiveSource() { enforceAccessPermission(); enforceAccessPermission(); HdmiCecLocalDeviceTv tv = tv(); HdmiCecLocalDeviceTv tv = tv(); if (tv == null) { if (tv == null) { Slog.w(TAG, "Local tv device not available"); if (isTvDevice()) { Slog.e(TAG, "Local tv device not available."); return null; } if (isPlaybackDevice()) { if (isPlaybackDevice()) { // if playback device itself is the active source, // if playback device itself is the active source, // return its own device info. // return its own device info. Loading Loading @@ -1457,7 +1461,10 @@ public class HdmiControlService extends SystemService { HdmiControlService.this, deviceId, callback)); HdmiControlService.this, deviceId, callback)); return; return; } } Slog.w(TAG, "Local tv device not available"); if (isTvDevice()) { Slog.e(TAG, "Local tv device not available"); return; } invokeCallback(callback, HdmiControlManager.RESULT_SOURCE_NOT_AVAILABLE); invokeCallback(callback, HdmiControlManager.RESULT_SOURCE_NOT_AVAILABLE); return; return; } } Loading Loading
services/core/java/com/android/server/hdmi/HdmiControlService.java +9 −2 Original line number Original line Diff line number Diff line Loading @@ -1392,11 +1392,15 @@ public class HdmiControlService extends SystemService { } } @Override @Override @Nullable public HdmiDeviceInfo getActiveSource() { public HdmiDeviceInfo getActiveSource() { enforceAccessPermission(); enforceAccessPermission(); HdmiCecLocalDeviceTv tv = tv(); HdmiCecLocalDeviceTv tv = tv(); if (tv == null) { if (tv == null) { Slog.w(TAG, "Local tv device not available"); if (isTvDevice()) { Slog.e(TAG, "Local tv device not available."); return null; } if (isPlaybackDevice()) { if (isPlaybackDevice()) { // if playback device itself is the active source, // if playback device itself is the active source, // return its own device info. // return its own device info. Loading Loading @@ -1457,7 +1461,10 @@ public class HdmiControlService extends SystemService { HdmiControlService.this, deviceId, callback)); HdmiControlService.this, deviceId, callback)); return; return; } } Slog.w(TAG, "Local tv device not available"); if (isTvDevice()) { Slog.e(TAG, "Local tv device not available"); return; } invokeCallback(callback, HdmiControlManager.RESULT_SOURCE_NOT_AVAILABLE); invokeCallback(callback, HdmiControlManager.RESULT_SOURCE_NOT_AVAILABLE); return; return; } } Loading