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

Commit b248aca0 authored by Kwangkyu Park's avatar Kwangkyu Park Committed by Michael Bestas
Browse files

Fix an issue that the sensor privacy does not apply to the new camera clients

The sensor privacy (Sensors Off tile) does not apply to the new camera
clients because the 'SensorPrivacyPolicy' in the 'CameraService' mixes
API usage for the camera privacy and the sensor privacy which are
'isToggleSensorPrivacyEnabled' and 'isSensorPrivacyEnabled'
respectively.

This patch will use the 'enabled' value to fix the issue.

Bug: 257426686
Test: manual test with 'Sensors Off' tile is enabled.
Change-Id: I23bc621afe7895863665c84518ed0cafe9356bf9
parent 1fea2819
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4022,7 +4022,7 @@ binder::Status CameraService::SensorPrivacyPolicy::onSensorPrivacyChanged(
    int toggleType __unused, int sensor __unused, bool enabled) {
    {
        Mutex::Autolock _l(mSensorPrivacyLock);
        mSensorPrivacyEnabled = mSpm.isToggleSensorPrivacyEnabled(SensorPrivacyManager::TOGGLE_SENSOR_CAMERA);
        mSensorPrivacyEnabled = enabled;
    }
    // if sensor privacy is enabled then block all clients from accessing the camera
    if (enabled) {