Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 1 | /* |
| 2 | ** |
| 3 | ** Copyright 2015, The Android Open Source Project |
| 4 | ** |
| 5 | ** Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | ** you may not use this file except in compliance with the License. |
| 7 | ** You may obtain a copy of the License at |
| 8 | ** |
| 9 | ** http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | ** |
| 11 | ** Unless required by applicable law or agreed to in writing, software |
| 12 | ** distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | ** See the License for the specific language governing permissions and |
| 15 | ** limitations under the License. |
| 16 | */ |
| 17 | |
Chong Zhang | 181e695 | 2019-10-09 13:23:39 -0700 | [diff] [blame] | 18 | #ifndef ANDROID_MEDIA_RESOURCEMANAGERSERVICE_H |
| 19 | #define ANDROID_MEDIA_RESOURCEMANAGERSERVICE_H |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 20 | |
Wonsik Kim | d20e936 | 2020-04-28 10:42:57 -0700 | [diff] [blame] | 21 | #include <map> |
Girish | 9128e24 | 2022-11-23 20:52:29 +0000 | [diff] [blame] | 22 | #include <set> |
Chong Zhang | 97d367b | 2020-09-16 12:53:14 -0700 | [diff] [blame] | 23 | #include <mutex> |
Girish | 9128e24 | 2022-11-23 20:52:29 +0000 | [diff] [blame] | 24 | #include <string> |
Girish | 434b4d8 | 2023-07-11 23:24:54 +0000 | [diff] [blame] | 25 | #include <vector> |
Wonsik Kim | d20e936 | 2020-04-28 10:42:57 -0700 | [diff] [blame] | 26 | |
Chong Zhang | fdd512a | 2019-11-22 11:03:14 -0800 | [diff] [blame] | 27 | #include <aidl/android/media/BnResourceManagerService.h> |
Chong Zhang | 181e695 | 2019-10-09 13:23:39 -0700 | [diff] [blame] | 28 | #include <media/MediaResource.h> |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 29 | #include <utils/Errors.h> |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 30 | #include <utils/String8.h> |
| 31 | #include <utils/threads.h> |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 32 | |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 33 | namespace android { |
| 34 | |
Chong Zhang | fdd512a | 2019-11-22 11:03:14 -0800 | [diff] [blame] | 35 | class DeathNotifier; |
Chong Zhang | a9d45c7 | 2020-09-09 12:41:17 -0700 | [diff] [blame] | 36 | class ResourceObserverService; |
Ronghua Wu | a8ec8fc | 2015-05-07 13:58:22 -0700 | [diff] [blame] | 37 | class ServiceLog; |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 38 | struct ProcessInfoInterface; |
Girish | 1f002cf | 2023-02-17 00:36:29 +0000 | [diff] [blame] | 39 | class ResourceManagerMetrics; |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 40 | |
Chong Zhang | fdd512a | 2019-11-22 11:03:14 -0800 | [diff] [blame] | 41 | using Status = ::ndk::ScopedAStatus; |
| 42 | using ::aidl::android::media::IResourceManagerClient; |
| 43 | using ::aidl::android::media::BnResourceManagerService; |
| 44 | using ::aidl::android::media::MediaResourceParcel; |
| 45 | using ::aidl::android::media::MediaResourcePolicyParcel; |
Girish | 9128e24 | 2022-11-23 20:52:29 +0000 | [diff] [blame] | 46 | using ::aidl::android::media::ClientInfoParcel; |
Girish | 1f002cf | 2023-02-17 00:36:29 +0000 | [diff] [blame] | 47 | using ::aidl::android::media::ClientConfigParcel; |
Chong Zhang | 181e695 | 2019-10-09 13:23:39 -0700 | [diff] [blame] | 48 | |
| 49 | typedef std::map<std::tuple< |
Jooyung Han | 3d564ff | 2020-02-22 00:46:06 +0900 | [diff] [blame] | 50 | MediaResource::Type, MediaResource::SubType, std::vector<uint8_t>>, |
Chong Zhang | 181e695 | 2019-10-09 13:23:39 -0700 | [diff] [blame] | 51 | MediaResourceParcel> ResourceList; |
| 52 | |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 53 | struct ResourceInfo { |
Chong Zhang | ee33d64 | 2019-08-08 14:26:43 -0700 | [diff] [blame] | 54 | uid_t uid; |
Girish | 9128e24 | 2022-11-23 20:52:29 +0000 | [diff] [blame] | 55 | int64_t clientId; |
| 56 | std::string name; |
Chong Zhang | fdd512a | 2019-11-22 11:03:14 -0800 | [diff] [blame] | 57 | std::shared_ptr<IResourceManagerClient> client; |
Girish | f1d166c | 2023-07-20 22:35:29 +0000 | [diff] [blame] | 58 | std::shared_ptr<DeathNotifier> deathNotifier = nullptr; |
Chong Zhang | fb092d3 | 2019-08-12 09:45:44 -0700 | [diff] [blame] | 59 | ResourceList resources; |
Wonsik Kim | d20e936 | 2020-04-28 10:42:57 -0700 | [diff] [blame] | 60 | bool pendingRemoval{false}; |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 61 | }; |
| 62 | |
Girish | 56fda31 | 2023-10-12 21:32:35 +0000 | [diff] [blame^] | 63 | /* |
| 64 | * Resource request info that encapsulates |
| 65 | * - the calling/requesting process pid. |
| 66 | * - the resource requesting (to be reclaimed from others) |
| 67 | */ |
| 68 | struct ResourceRequestInfo { |
| 69 | // uid of the calling/requesting process. |
| 70 | int mCallingPid = -1; |
| 71 | // resources requested. |
| 72 | const ::aidl::android::media::MediaResourceParcel* mResource; |
| 73 | }; |
| 74 | |
| 75 | /* |
| 76 | * Structure that defines the Client - a possible target to relcaim from. |
| 77 | * This encapsulates pid, uid of the process and the client. |
| 78 | * based on the reclaim policy. |
| 79 | */ |
| 80 | struct ClientInfo { |
| 81 | // pid of the process. |
| 82 | pid_t mPid; |
| 83 | // uid of the process. |
| 84 | uid_t mUid; |
| 85 | // Client to relcaim from. |
| 86 | std::shared_ptr<::aidl::android::media::IResourceManagerClient> mClient; |
| 87 | ClientInfo( |
| 88 | pid_t pid = -1, |
| 89 | uid_t uid = -1, |
| 90 | const std::shared_ptr<::aidl::android::media::IResourceManagerClient>& client = nullptr) |
| 91 | : mPid(pid), |
| 92 | mUid(uid), |
| 93 | mClient(client) { |
| 94 | } |
| 95 | }; |
Girish | 9128e24 | 2022-11-23 20:52:29 +0000 | [diff] [blame] | 96 | |
Girish | 434b4d8 | 2023-07-11 23:24:54 +0000 | [diff] [blame] | 97 | typedef std::map<int64_t, ResourceInfo> ResourceInfos; |
| 98 | typedef std::map<int, ResourceInfos> PidResourceInfosMap; |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 99 | |
Chong Zhang | fdd512a | 2019-11-22 11:03:14 -0800 | [diff] [blame] | 100 | class ResourceManagerService : public BnResourceManagerService { |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 101 | public: |
Chong Zhang | dd72680 | 2019-08-21 17:24:13 -0700 | [diff] [blame] | 102 | struct SystemCallbackInterface : public RefBase { |
| 103 | virtual void noteStartVideo(int uid) = 0; |
| 104 | virtual void noteStopVideo(int uid) = 0; |
| 105 | virtual void noteResetVideo() = 0; |
Chong Zhang | fdd512a | 2019-11-22 11:03:14 -0800 | [diff] [blame] | 106 | virtual bool requestCpusetBoost(bool enable) = 0; |
Chong Zhang | dd72680 | 2019-08-21 17:24:13 -0700 | [diff] [blame] | 107 | }; |
| 108 | |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 109 | static char const *getServiceName() { return "media.resource_manager"; } |
Chong Zhang | fdd512a | 2019-11-22 11:03:14 -0800 | [diff] [blame] | 110 | static void instantiate(); |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 111 | |
Chong Zhang | fdd512a | 2019-11-22 11:03:14 -0800 | [diff] [blame] | 112 | virtual inline binder_status_t dump( |
| 113 | int /*fd*/, const char** /*args*/, uint32_t /*numArgs*/); |
Ronghua Wu | 8f9dd87 | 2015-04-23 15:24:25 -0700 | [diff] [blame] | 114 | |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 115 | ResourceManagerService(); |
Brian Lindahl | 64ee945 | 2022-01-14 13:31:16 +0100 | [diff] [blame] | 116 | explicit ResourceManagerService(const sp<ProcessInfoInterface> &processInfo, |
Chong Zhang | dd72680 | 2019-08-21 17:24:13 -0700 | [diff] [blame] | 117 | const sp<SystemCallbackInterface> &systemResource); |
Chong Zhang | fdd512a | 2019-11-22 11:03:14 -0800 | [diff] [blame] | 118 | virtual ~ResourceManagerService(); |
Brian Lindahl | 64ee945 | 2022-01-14 13:31:16 +0100 | [diff] [blame] | 119 | void setObserverService(const std::shared_ptr<ResourceObserverService>& observerService); |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 120 | |
| 121 | // IResourceManagerService interface |
Chong Zhang | 181e695 | 2019-10-09 13:23:39 -0700 | [diff] [blame] | 122 | Status config(const std::vector<MediaResourcePolicyParcel>& policies) override; |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 123 | |
Girish | 9128e24 | 2022-11-23 20:52:29 +0000 | [diff] [blame] | 124 | Status addResource(const ClientInfoParcel& clientInfo, |
| 125 | const std::shared_ptr<IResourceManagerClient>& client, |
| 126 | const std::vector<MediaResourceParcel>& resources) override; |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 127 | |
Girish | 9128e24 | 2022-11-23 20:52:29 +0000 | [diff] [blame] | 128 | Status removeResource(const ClientInfoParcel& clientInfo, |
| 129 | const std::vector<MediaResourceParcel>& resources) override; |
Chong Zhang | fb092d3 | 2019-08-12 09:45:44 -0700 | [diff] [blame] | 130 | |
Girish | 9128e24 | 2022-11-23 20:52:29 +0000 | [diff] [blame] | 131 | Status removeClient(const ClientInfoParcel& clientInfo) override; |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 132 | |
Ronghua Wu | 05d89f1 | 2015-07-07 16:47:42 -0700 | [diff] [blame] | 133 | // Tries to reclaim resource from processes with lower priority than the calling process |
| 134 | // according to the requested resources. |
| 135 | // Returns true if any resource has been reclaimed, otherwise returns false. |
Girish | 9128e24 | 2022-11-23 20:52:29 +0000 | [diff] [blame] | 136 | Status reclaimResource(const ClientInfoParcel& clientInfo, |
| 137 | const std::vector<MediaResourceParcel>& resources, |
| 138 | bool* _aidl_return) override; |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 139 | |
Girish | 9128e24 | 2022-11-23 20:52:29 +0000 | [diff] [blame] | 140 | Status overridePid(int32_t originalPid, int32_t newPid) override; |
Henry Fang | 3276292 | 2020-01-28 18:40:39 -0800 | [diff] [blame] | 141 | |
Girish | 9128e24 | 2022-11-23 20:52:29 +0000 | [diff] [blame] | 142 | Status overrideProcessInfo(const std::shared_ptr<IResourceManagerClient>& client, |
| 143 | int32_t pid, int32_t procState, int32_t oomScore) override; |
Chong Zhang | 97d367b | 2020-09-16 12:53:14 -0700 | [diff] [blame] | 144 | |
Girish | 9128e24 | 2022-11-23 20:52:29 +0000 | [diff] [blame] | 145 | Status markClientForPendingRemoval(const ClientInfoParcel& clientInfo) override; |
Wonsik Kim | d20e936 | 2020-04-28 10:42:57 -0700 | [diff] [blame] | 146 | |
Wonsik Kim | 271429d | 2020-10-01 10:12:56 -0700 | [diff] [blame] | 147 | Status reclaimResourcesFromClientsPendingRemoval(int32_t pid) override; |
| 148 | |
Girish | 9128e24 | 2022-11-23 20:52:29 +0000 | [diff] [blame] | 149 | Status removeResource(const ClientInfoParcel& clientInfo, bool checkValid); |
Wonsik Kim | 3e37896 | 2017-01-05 17:00:02 +0900 | [diff] [blame] | 150 | |
Girish | 1f002cf | 2023-02-17 00:36:29 +0000 | [diff] [blame] | 151 | Status notifyClientCreated(const ClientInfoParcel& clientInfo) override; |
| 152 | |
| 153 | Status notifyClientStarted(const ClientConfigParcel& clientConfig) override; |
| 154 | |
| 155 | Status notifyClientStopped(const ClientConfigParcel& clientConfig) override; |
| 156 | |
Girish | de8eb59 | 2023-04-13 18:49:17 +0000 | [diff] [blame] | 157 | Status notifyClientConfigChanged(const ClientConfigParcel& clientConfig) override; |
| 158 | |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 159 | private: |
| 160 | friend class ResourceManagerServiceTest; |
Chong Zhang | 97d367b | 2020-09-16 12:53:14 -0700 | [diff] [blame] | 161 | friend class DeathNotifier; |
| 162 | friend class OverrideProcessInfoDeathNotifier; |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 163 | |
Wonsik Kim | 271429d | 2020-10-01 10:12:56 -0700 | [diff] [blame] | 164 | // Reclaims resources from |clients|. Returns true if reclaim succeeded |
| 165 | // for all clients. |
Girish | 434b4d8 | 2023-07-11 23:24:54 +0000 | [diff] [blame] | 166 | bool reclaimUnconditionallyFrom( |
Girish | 56fda31 | 2023-10-12 21:32:35 +0000 | [diff] [blame^] | 167 | const std::vector<ClientInfo>& targetClients); |
Wonsik Kim | 271429d | 2020-10-01 10:12:56 -0700 | [diff] [blame] | 168 | |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 169 | // Gets the list of all the clients who own the specified resource type. |
| 170 | // Returns false if any client belongs to a process with higher priority than the |
| 171 | // calling process. The clients will remain unchanged if returns false. |
Girish | 56fda31 | 2023-10-12 21:32:35 +0000 | [diff] [blame^] | 172 | bool getAllClients_l(const ResourceRequestInfo& resourceRequestInfo, |
| 173 | std::vector<ClientInfo>& clientsInfo); |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 174 | |
| 175 | // Gets the client who owns specified resource type from lowest possible priority process. |
| 176 | // Returns false if the calling process priority is not higher than the lowest process |
| 177 | // priority. The client will remain unchanged if returns false. |
Girish | 56fda31 | 2023-10-12 21:32:35 +0000 | [diff] [blame^] | 178 | bool getLowestPriorityBiggestClient_l( |
| 179 | const ResourceRequestInfo& resourceRequestInfo, |
| 180 | ClientInfo& clientInfo); |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 181 | |
| 182 | // Gets the client who owns biggest piece of specified resource type from pid. |
Girish | 56fda31 | 2023-10-12 21:32:35 +0000 | [diff] [blame^] | 183 | // Returns false with no change to client if there are no clients holding resources of this |
Brian Lindahl | 64ee945 | 2022-01-14 13:31:16 +0100 | [diff] [blame] | 184 | // type. |
| 185 | bool getBiggestClient_l(int pid, MediaResource::Type type, MediaResource::SubType subType, |
Girish | 56fda31 | 2023-10-12 21:32:35 +0000 | [diff] [blame^] | 186 | uid_t& uid, std::shared_ptr<IResourceManagerClient> *client, |
| 187 | bool pendingRemovalOnly = false); |
Brian Lindahl | 64ee945 | 2022-01-14 13:31:16 +0100 | [diff] [blame] | 188 | // Same method as above, but with pendingRemovalOnly as true. |
| 189 | bool getBiggestClientPendingRemoval_l(int pid, MediaResource::Type type, |
Girish | 56fda31 | 2023-10-12 21:32:35 +0000 | [diff] [blame^] | 190 | MediaResource::SubType subType, uid_t& uid, |
| 191 | std::shared_ptr<IResourceManagerClient>* client); |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 192 | |
Girish | 56fda31 | 2023-10-12 21:32:35 +0000 | [diff] [blame^] | 193 | // A helper function that returns true if the callingPid has higher priority than pid. |
| 194 | // Returns false otherwise. |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 195 | bool isCallingPriorityHigher_l(int callingPid, int pid); |
| 196 | |
Girish | 56fda31 | 2023-10-12 21:32:35 +0000 | [diff] [blame^] | 197 | // A helper function basically calls getLowestPriorityBiggestClient_l and adds |
Chong Zhang | fdd512a | 2019-11-22 11:03:14 -0800 | [diff] [blame] | 198 | // the result client to the given Vector. |
Girish | 56fda31 | 2023-10-12 21:32:35 +0000 | [diff] [blame^] | 199 | void getClientForResource_l(const ResourceRequestInfo& resourceRequestInfo, |
| 200 | std::vector<ClientInfo>& clientsInfo); |
Ronghua Wu | 05d89f1 | 2015-07-07 16:47:42 -0700 | [diff] [blame] | 201 | |
Chong Zhang | 181e695 | 2019-10-09 13:23:39 -0700 | [diff] [blame] | 202 | void onFirstAdded(const MediaResourceParcel& res, const ResourceInfo& clientInfo); |
| 203 | void onLastRemoved(const MediaResourceParcel& res, const ResourceInfo& clientInfo); |
Chong Zhang | fb092d3 | 2019-08-12 09:45:44 -0700 | [diff] [blame] | 204 | |
Robert Shih | c3af31b | 2019-09-20 21:45:01 -0700 | [diff] [blame] | 205 | // Merge r2 into r1 |
Chong Zhang | 181e695 | 2019-10-09 13:23:39 -0700 | [diff] [blame] | 206 | void mergeResources(MediaResourceParcel& r1, const MediaResourceParcel& r2); |
Robert Shih | c3af31b | 2019-09-20 21:45:01 -0700 | [diff] [blame] | 207 | |
Henry Fang | 3276292 | 2020-01-28 18:40:39 -0800 | [diff] [blame] | 208 | // Get priority from process's pid |
| 209 | bool getPriority_l(int pid, int* priority); |
| 210 | |
Chong Zhang | 97d367b | 2020-09-16 12:53:14 -0700 | [diff] [blame] | 211 | void removeProcessInfoOverride(int pid); |
| 212 | |
| 213 | void removeProcessInfoOverride_l(int pid); |
Chong Zhang | 97d367b | 2020-09-16 12:53:14 -0700 | [diff] [blame] | 214 | |
Girish | 9128e24 | 2022-11-23 20:52:29 +0000 | [diff] [blame] | 215 | void pushReclaimAtom(const ClientInfoParcel& clientInfo, |
Girish | 56fda31 | 2023-10-12 21:32:35 +0000 | [diff] [blame^] | 216 | const std::vector<ClientInfo>& targetClients, |
| 217 | bool reclaimed); |
Girish | 9128e24 | 2022-11-23 20:52:29 +0000 | [diff] [blame] | 218 | |
Girish | 56fda31 | 2023-10-12 21:32:35 +0000 | [diff] [blame^] | 219 | // The following utility functions are used only for testing by ResourceManagerServiceTest |
| 220 | // Gets lowest priority process that has the specified resource type. |
| 221 | // Returns false if failed. The output parameters will remain unchanged if failed. |
| 222 | bool getLowestPriorityPid_l(MediaResource::Type type, MediaResource::SubType subType, |
| 223 | int* lowestPriorityPid, int* lowestPriority); |
Girish | 1f002cf | 2023-02-17 00:36:29 +0000 | [diff] [blame] | 224 | // Get the peak concurrent pixel count (associated with the video codecs) for the process. |
| 225 | long getPeakConcurrentPixelCount(int pid) const; |
| 226 | // Get the current concurrent pixel count (associated with the video codecs) for the process. |
| 227 | long getCurrentConcurrentPixelCount(int pid) const; |
| 228 | |
Girish | 434b4d8 | 2023-07-11 23:24:54 +0000 | [diff] [blame] | 229 | mutable std::mutex mLock; |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 230 | sp<ProcessInfoInterface> mProcessInfo; |
Chong Zhang | dd72680 | 2019-08-21 17:24:13 -0700 | [diff] [blame] | 231 | sp<SystemCallbackInterface> mSystemCB; |
Ronghua Wu | a8ec8fc | 2015-05-07 13:58:22 -0700 | [diff] [blame] | 232 | sp<ServiceLog> mServiceLog; |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 233 | PidResourceInfosMap mMap; |
| 234 | bool mSupportsMultipleSecureCodecs; |
| 235 | bool mSupportsSecureWithNonSecureCodec; |
Chong Zhang | 79d2b28 | 2018-04-17 14:14:31 -0700 | [diff] [blame] | 236 | int32_t mCpuBoostCount; |
Chong Zhang | fdd512a | 2019-11-22 11:03:14 -0800 | [diff] [blame] | 237 | ::ndk::ScopedAIBinder_DeathRecipient mDeathRecipient; |
Chong Zhang | 97d367b | 2020-09-16 12:53:14 -0700 | [diff] [blame] | 238 | struct ProcessInfoOverride { |
Girish | f1d166c | 2023-07-20 22:35:29 +0000 | [diff] [blame] | 239 | std::shared_ptr<DeathNotifier> deathNotifier = nullptr; |
Chong Zhang | 97d367b | 2020-09-16 12:53:14 -0700 | [diff] [blame] | 240 | std::shared_ptr<IResourceManagerClient> client; |
| 241 | }; |
Henry Fang | 3276292 | 2020-01-28 18:40:39 -0800 | [diff] [blame] | 242 | std::map<int, int> mOverridePidMap; |
Chong Zhang | 97d367b | 2020-09-16 12:53:14 -0700 | [diff] [blame] | 243 | std::map<pid_t, ProcessInfoOverride> mProcessInfoOverrideMap; |
Chong Zhang | a9d45c7 | 2020-09-09 12:41:17 -0700 | [diff] [blame] | 244 | std::shared_ptr<ResourceObserverService> mObserverService; |
Girish | 1f002cf | 2023-02-17 00:36:29 +0000 | [diff] [blame] | 245 | std::unique_ptr<ResourceManagerMetrics> mResourceManagerMetrics; |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 246 | }; |
| 247 | |
| 248 | // ---------------------------------------------------------------------------- |
Chong Zhang | 181e695 | 2019-10-09 13:23:39 -0700 | [diff] [blame] | 249 | } // namespace android |
Ronghua Wu | 231c3d1 | 2015-03-11 15:10:32 -0700 | [diff] [blame] | 250 | |
Chong Zhang | 181e695 | 2019-10-09 13:23:39 -0700 | [diff] [blame] | 251 | #endif // ANDROID_MEDIA_RESOURCEMANAGERSERVICE_H |