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

Commit 8143e57c authored by Jyoti Bhayana's avatar Jyoti Bhayana
Browse files

Adding some comments regarding camera privacy in cameraservice

for clarification and easier understanding

Bug: 264714639
Test: Build and compile fine
Change-Id: I9772801555924af96187a227b377b81ca283f325
parent f5a3c7c4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3525,6 +3525,11 @@ status_t CameraService::BasicClient::handleAppOpMode(int32_t mode) {
                mClientPackageName);
        bool isCameraPrivacyEnabled =
                sCameraService->mSensorPrivacyPolicy->isCameraPrivacyEnabled();
        // We don't want to return EACCESS if the CameraPrivacy is enabled.
        // We prefer to successfully open the camera and perform camera muting
        // or blocking in connectHelper as handleAppOpMode can be called before the
        // connection has been fully established and at that time camera muting
        // capabilities are unknown.
        if (!isUidActive || !isCameraPrivacyEnabled) {
            ALOGI("Camera %s: Access for \"%s\" has been restricted",
                    mCameraIdStr.string(), String8(mClientPackageName).string());