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

Commit 912a8eb3 authored by Norman Bintang's avatar Norman Bintang Committed by Android (Google) Code Review
Browse files

Merge "Use explicit user id for setSensorPrivacy" into main

parents a19feb3c b2f850e0
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -184,6 +184,7 @@ import android.provider.DeviceConfig;
import android.provider.MediaStore;
import android.provider.Settings;
import android.provider.Settings.Secure;
import android.service.SensorPrivacyToggleSourceProto;
import android.service.dreams.DreamManagerInternal;
import android.service.dreams.DreamService;
import android.service.dreams.IDreamManager;
@@ -4536,8 +4537,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                    SensorPrivacyManager.TOGGLE_TYPE_SOFTWARE,
                    SensorPrivacyManager.Sensors.MICROPHONE);

            mSensorPrivacyManager.setSensorPrivacy(SensorPrivacyManager.Sensors.MICROPHONE,
                    !isEnabled);
            mSensorPrivacyManager.setSensorPrivacy(SensorPrivacyToggleSourceProto.OTHER,
                    SensorPrivacyManager.Sensors.MICROPHONE, !isEnabled, mCurrentUserId);

            int toastTextResId;
            if (isEnabled) {