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

Commit 4d3551a3 authored by Amy's avatar Amy Committed by Amy Zhang
Browse files

Fix log spam "Local tv device not available".

Test: manual
Bug: 120249926
Change-Id: I07771a2595d1196a773206157444013da4d13b46
(cherry picked from commit 4d3f84608a1e733125286a4b68df188a6bf1da37)
parent 4d1a60d7
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;
                    }
                    }