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

Commit 4e225071 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Adding some comments regarding camera privacy in cameraservice for...

Merge "Adding some comments regarding camera privacy in cameraservice for clarification and easier understanding"
parents 6232ad72 8143e57c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3532,6 +3532,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());