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

Commit 1fffa73d authored by Chong Zhang's avatar Chong Zhang Committed by Android (Google) Code Review
Browse files

Merge "check camera permission for video source other than SURFACE"

parents 6f264ac0 1cfe8ce2
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);