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

Unverified Commit 2a75cd6d authored by Michael Bestas's avatar Michael Bestas
Browse files

Merge tag 'android-13.0.0_r61' into staging/lineage-20.0_merge-android-13.0.0_r61

Android 13.0.0 release 61

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCZKXIzAAKCRDorT+BmrEO
# eD50AJwNQG8IyU8YYxqisqq6UhS3HnoChACfS4P6T5iIb+2eRi+p8mqXodyBi/I=
# =k6cw
# -----END PGP SIGNATURE-----
# gpg: Signature made Wed Jul  5 22:47:24 2023 EEST
# gpg:                using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" [marginal]
# gpg: initial-contribution@android.com: Verified 1766 signatures in the past
#      20 months.  Encrypted 4 messages in the past 18 months.
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 4340 D135 70EF 945E 8381  0964 E8AD 3F81 9AB1 0E78

# By Atneya Nair
# Via Android Build Coastguard Worker
* tag 'android-13.0.0_r61':
  Force unsilence record clients on startInput

Change-Id: I62352abc01d3f7c87958352d4ce6b46d77a70c5a
parents f6fc009d 95be9bad
Loading
Loading
Loading
Loading
+21 −0
Original line number Original line Diff line number Diff line
@@ -795,8 +795,29 @@ Status AudioPolicyService::startInput(int32_t portIdAidl)


    Mutex::Autolock _l(mLock);
    Mutex::Autolock _l(mLock);


    ALOGW_IF(client->silenced, "startInput on silenced input for port %d, uid %d. Unsilencing.",
            portIdAidl,
            client->attributionSource.uid);

    if (client->active) {
        ALOGE("Client should never be active before startInput. Uid %d port %d",
                client->attributionSource.uid, portId);
        finishRecording(client->attributionSource, client->attributes.source);
        return binderStatusFromStatusT(INVALID_OPERATION);
    }

    // Force the possibly silenced client to be unsilenced since we just called
    // startRecording (i.e. we have assumed it is unsilenced).
    // At this point in time, the client is inactive, so no calls to appops are sent in
    // setAppState_l.
    // This ensures existing clients have the same behavior as new clients (starting unsilenced).
    // TODO(b/282076713)
    setAppState_l(client, APP_STATE_TOP);

    client->active = true;
    client->active = true;
    client->startTimeNs = systemTime();
    client->startTimeNs = systemTime();
    // This call updates the silenced state, and since we are active, appropriately notifies appops
    // if we silence the track.
    updateUidStates_l();
    updateUidStates_l();


    status_t status;
    status_t status;