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

Commit cdde799c authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "audio policy: remove capture restrictions for IN_COMMUNICATION mode" into rvc-dev

parents 9cc5cecf ffabb495
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -566,11 +566,13 @@ void AudioPolicyService::updateUidStates_l()

        auto canCaptureIfInCallOrCommunication = [&](const auto &recordClient) REQUIRES(mLock) {
            bool canCaptureCall = recordClient->canCaptureOutput;
            bool canCaptureCommunication = recordClient->canCaptureOutput
                || recordClient->uid == mPhoneStateOwnerUid
                || isServiceUid(mPhoneStateOwnerUid);
            return !(isInCall && !canCaptureCall)
                && !(isInCommunication && !canCaptureCommunication);
            return !(isInCall && !canCaptureCall);
//TODO(b/160260850): restore restriction to mode owner once fix for misbehaving apps is merged
//            bool canCaptureCommunication = recordClient->canCaptureOutput
//                || recordClient->uid == mPhoneStateOwnerUid
//                || isServiceUid(mPhoneStateOwnerUid);
//            return !(isInCall && !canCaptureCall)
//                && !(isInCommunication && !canCaptureCommunication);
        };

        // By default allow capture if: