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

Commit 73725155 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "resourcemanager: update clientInfo when create DeathNotifier" into main...

Merge "resourcemanager: update clientInfo when create DeathNotifier" into main am: 1572bcac am: 7b3cad82

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



Change-Id: Ib25882ee25fd60b00c5dc261affb86aba26635c9
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 6b97b8df 7b3cad82
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -310,6 +310,7 @@ Status ResourceManagerService::addResource(const ClientInfoParcel& clientInfo,
    mServiceLog->add(log);

    std::scoped_lock lock{mLock};
    ClientInfoParcel updatedClientInfo = clientInfo;
    if (!mProcessInfo->isPidUidTrusted(pid, uid)) {
        pid_t callingPid = IPCThreadState::self()->getCallingPid();
        uid_t callingUid = IPCThreadState::self()->getCallingUid();
@@ -317,6 +318,8 @@ Status ResourceManagerService::addResource(const ClientInfoParcel& clientInfo,
                __FUNCTION__, pid, uid, callingPid, callingUid);
        pid = callingPid;
        uid = callingUid;
        updatedClientInfo.pid = callingPid;
        updatedClientInfo.uid = callingUid;
    }
    ResourceInfos& infos = getResourceInfosForEdit(pid, mMap);
    ResourceInfo& info = getResourceInfoForEdit(clientInfo, client, infos);
@@ -342,7 +345,7 @@ Status ResourceManagerService::addResource(const ClientInfoParcel& clientInfo,
    }
    if (info.deathNotifier == nullptr && client != nullptr) {
        info.deathNotifier = DeathNotifier::Create(
            client, ref<ResourceManagerService>(), clientInfo);
            client, ref<ResourceManagerService>(), updatedClientInfo);
    }
    if (mObserverService != nullptr && !resourceAdded.empty()) {
        mObserverService->onResourceAdded(uid, pid, resourceAdded);