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

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

Merge "Fix warning in audio policy service" into nyc-dev

parents 886e9118 9f39f8d6
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -287,7 +287,7 @@ status_t AudioPolicyService::getInputForAttr(const audio_attributes_t *attr,
    bool updatePid = (pid == -1);
    bool updatePid = (pid == -1);
    const uid_t callingUid = IPCThreadState::self()->getCallingUid();
    const uid_t callingUid = IPCThreadState::self()->getCallingUid();
    if (!isTrustedCallingUid(callingUid)) {
    if (!isTrustedCallingUid(callingUid)) {
        ALOGW_IF(uid != -1 && uid != (int)callingUid,
        ALOGW_IF(uid != (uid_t)-1 && uid != callingUid,
                "%s uid %d tried to pass itself off as %d", __FUNCTION__, callingUid, uid);
                "%s uid %d tried to pass itself off as %d", __FUNCTION__, callingUid, uid);
        uid = callingUid;
        uid = callingUid;
        updatePid = true;
        updatePid = true;
@@ -295,7 +295,7 @@ status_t AudioPolicyService::getInputForAttr(const audio_attributes_t *attr,


    if (updatePid) {
    if (updatePid) {
        const pid_t callingPid = IPCThreadState::self()->getCallingPid();
        const pid_t callingPid = IPCThreadState::self()->getCallingPid();
        ALOGW_IF(pid != -1 && pid != callingPid,
        ALOGW_IF(pid != (pid_t)-1 && pid != callingPid,
                 "%s uid %d pid %d tried to pass itself off as pid %d",
                 "%s uid %d pid %d tried to pass itself off as pid %d",
                 __func__, callingUid, callingPid, pid);
                 __func__, callingUid, callingPid, pid);
        pid = callingPid;
        pid = callingPid;