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

Commit 1cfe8ce2 authored by Chong Zhang's avatar Chong Zhang
Browse files

check camera permission for video source other than SURFACE

Bug: 15448704
Change-Id: I5f5417037b877a6da3a46700ebb5a80ea59aac36
parent f7ceda19
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -95,7 +95,8 @@ status_t MediaRecorderClient::setPreviewSurface(const sp<IGraphicBufferProducer>
status_t MediaRecorderClient::setVideoSource(int vs)
{
    ALOGV("setVideoSource(%d)", vs);
    if (!checkPermission(cameraPermission)) {
    // Check camera permission for sources other than SURFACE
    if (vs != VIDEO_SOURCE_SURFACE && !checkPermission(cameraPermission)) {
        return PERMISSION_DENIED;
    }
    Mutex::Autolock lock(mLock);