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

Commit 707b987c authored by Eric Laurent's avatar Eric Laurent Committed by Automerger Merge Worker
Browse files

Merge "audio policy: remove capture restrictions for IN_COMMUNICATION mode"...

Merge "audio policy: remove capture restrictions for IN_COMMUNICATION mode" into rvc-dev am: cdde799c am: 3b2563bd

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/12048628

Change-Id: I11e6f06583f316493e4986aa82285d135a45030f
parents e044a969 3b2563bd
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: