Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d7880d7 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix log spam "Local tv device not available"."

parents 846b59ea 4d3551a3
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -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.
@@ -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;
                    }
                    }