Fix log spam "Local tv device not available".
Test: manual Bug: 120249926 Change-Id: I07771a2595d1196a773206157444013da4d13b46 (cherry picked from commit 4d3f84608a1e733125286a4b68df188a6bf1da37)
This commit is contained in:
@@ -1392,11 +1392,15 @@ public class HdmiControlService extends SystemService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public HdmiDeviceInfo getActiveSource() {
|
||||
enforceAccessPermission();
|
||||
HdmiCecLocalDeviceTv tv = tv();
|
||||
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 playback device itself is the active source,
|
||||
// return its own device info.
|
||||
@@ -1457,7 +1461,10 @@ public class HdmiControlService extends SystemService {
|
||||
HdmiControlService.this, deviceId, callback));
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user