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

Commit c9e9ec39 authored by Victor Truong's avatar Victor Truong
Browse files

Fix blocked sensor chip to hide if settings change.

The controller never hides a chip, so if the user changes mic or camera access from the shade, more than 1 chip can be seen.

Bug: 233914017
Test: Manually
Change-Id: I6605eae199222378a6778a965787e95ca1dec08c
parent f16401f0
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -215,16 +215,15 @@ public class DreamOverlayStatusBarViewController extends ViewController<DreamOve
        final boolean cameraBlocked = mSensorPrivacyController
                .isSensorBlocked(SensorPrivacyManager.Sensors.CAMERA);
        @DreamOverlayStatusBarView.StatusIconType int iconType = Resources.ID_NULL;
        if (micBlocked && cameraBlocked) {
            iconType = DreamOverlayStatusBarView.STATUS_ICON_MIC_CAMERA_DISABLED;
        } else if (!micBlocked && cameraBlocked) {
            iconType = DreamOverlayStatusBarView.STATUS_ICON_CAMERA_DISABLED;
        } else if (micBlocked && !cameraBlocked) {
            iconType = DreamOverlayStatusBarView.STATUS_ICON_MIC_DISABLED;
        }
        if (iconType != Resources.ID_NULL) {
            showIcon(iconType, true);
        }
        showIcon(
                DreamOverlayStatusBarView.STATUS_ICON_CAMERA_DISABLED,
                !micBlocked && cameraBlocked);
        showIcon(
                DreamOverlayStatusBarView.STATUS_ICON_MIC_DISABLED,
                micBlocked && !cameraBlocked);
        showIcon(
                DreamOverlayStatusBarView.STATUS_ICON_MIC_CAMERA_DISABLED,
                micBlocked && cameraBlocked);
    }

    private String buildNotificationsContentDescription(int notificationCount) {