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

Commit 3b2563bd 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

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

Change-Id: Ife1c916a3f075587fb3d41ef5296dae1e5e0d55a
parents 3e88bb8e cdde799c
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: