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
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user