diff options
author | Chih-Hung Hsieh <chh@google.com> | 2015-03-19 21:18:16 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-03-19 21:18:17 +0000 |
commit | 446ef2025374cee74ee6291b2a11bfa56017ea74 (patch) | |
tree | 52e9819b395aca9bed413d756278c54ff877e99d /services | |
parent | 1c15c670928bab5eef6b1a06cf49378abb1e70bf (diff) | |
parent | 54b4246bb2025a5dcfdf1611c199998448d28424 (diff) | |
download | frameworks_av-446ef2025374cee74ee6291b2a11bfa56017ea74.zip frameworks_av-446ef2025374cee74ee6291b2a11bfa56017ea74.tar.gz frameworks_av-446ef2025374cee74ee6291b2a11bfa56017ea74.tar.bz2 |
Merge "Fix link error of PROCESS_STATE_NONEXISTENT."
Diffstat (limited to 'services')
-rw-r--r-- | services/camera/libcameraservice/CameraService.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp index 574165b..55f7a40 100644 --- a/services/camera/libcameraservice/CameraService.cpp +++ b/services/camera/libcameraservice/CameraService.cpp @@ -884,7 +884,11 @@ status_t CameraService::handleEvictionsLocked(const String8& cameraId, int clien std::vector<int> ownerPids(mActiveClientManager.getAllOwners()); ownerPids.push_back(clientPid); - std::vector<int> priorities(ownerPids.size(), PROCESS_STATE_NONEXISTENT); + // Use the value +PROCESS_STATE_NONEXISTENT, to avoid taking + // address of PROCESS_STATE_NONEXISTENT as a reference argument + // for the vector constructor. PROCESS_STATE_NONEXISTENT does + // not have an out-of-class definition. + std::vector<int> priorities(ownerPids.size(), +PROCESS_STATE_NONEXISTENT); // Get priorites of all active PIDs ProcessInfoService::getProcessStatesFromPids(ownerPids.size(), &ownerPids[0], |