resourcemanager: protect resources from concurrent access

Since getClient access resources (map), make sure its protected
from the concurrent access.

Bug: 289097671
Test: atest android.media.misc.cts.ResourceManagerTest
      atest android.media.misc.cts.ResourceManagerMultiTest
      /data/nativetest64/ResourceManagerService_test/ResourceManagerService_test
      /data/nativetest64/ResourceObserverService_test/ResourceObserverService_test
Change-Id: Ica03c3dc45b97502414c76c10057acc9c9b0c03d
diff --git a/services/mediaresourcemanager/ResourceManagerService.h b/services/mediaresourcemanager/ResourceManagerService.h
index c2682a9..dc1600a 100644
--- a/services/mediaresourcemanager/ResourceManagerService.h
+++ b/services/mediaresourcemanager/ResourceManagerService.h
@@ -210,11 +210,11 @@
     virtual void removeProcessInfoOverride(int pid);
 
     // Get the client for given pid and the clientId from the map
-    virtual std::shared_ptr<IResourceManagerClient> getClient(
+    virtual std::shared_ptr<IResourceManagerClient> getClient_l(
         int pid, const int64_t& clientId) const;
 
     // Remove the client for given pid and the clientId from the map
-    virtual bool removeClient(int pid, const int64_t& clientId);
+    virtual bool removeClient_l(int pid, const int64_t& clientId);
 
     // Get all the resource status for dump
     virtual void getResourceDump(std::string& resourceLog) const;