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

Commit 7bbb4840 authored by Alice Wang's avatar Alice Wang Committed by Gerrit Code Review
Browse files

Merge "[RpcSession] Add checks before setting SessionSpecificRoot" into main

parents f53f1f71 c0d50957
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -802,6 +802,10 @@ bool RpcSession::setForServer(const wp<RpcServer>& server, const wp<EventListene
}

void RpcSession::setSessionSpecificRoot(const sp<IBinder>& sessionSpecificRoot) {
    LOG_ALWAYS_FATAL_IF(mSessionSpecificRootObject != nullptr,
                        "Session specific root object already set");
    LOG_ALWAYS_FATAL_IF(mForServer != nullptr,
                        "Session specific root object cannot be set for a server");
    mSessionSpecificRootObject = sessionSpecificRoot;
}