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

Commit 9f39f8d6 authored by Eric Laurent's avatar Eric Laurent
Browse files

Fix warning in audio policy service

Change-Id: I33b20b7007e19e8b2514ffdf2232e9c1d7314d9f
parent a2ebcc04
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;