Loading services/camera/libcameraservice/CameraService.cpp +7 −11 Original line number Diff line number Diff line Loading @@ -5534,7 +5534,7 @@ static bool tryLock(Mutex& mutex) return locked; } void CameraService::cacheDump() { void CameraService::cacheDump(const std::string& cameraId) { if (mMemFd != -1) { const Vector<String16> args; ATRACE_CALL(); Loading @@ -5542,10 +5542,7 @@ void CameraService::cacheDump() { // cacheDump will not be called during the second disconnect. Mutex::Autolock lock(mServiceLock); Mutex::Autolock l(mCameraStatesLock); // Start collecting the info for open sessions and store it in temp file. for (const auto& state : mCameraStates) { std::string cameraId = state.first; // Start collecting the info for calling camera Id and store it in temp file. auto clientDescriptor = mActiveClientManager.get(cameraId); if (clientDescriptor != nullptr) { dprintf(mMemFd, "== Camera device %s dynamic info: ==\n", cameraId.c_str()); Loading @@ -5554,7 +5551,6 @@ void CameraService::cacheDump() { } } } } status_t CameraService::dump(int fd, const Vector<String16>& args) { ATRACE_CALL(); Loading services/camera/libcameraservice/CameraService.h +1 −1 Original line number Diff line number Diff line Loading @@ -286,7 +286,7 @@ public: void notifyMonitoredUids(const std::unordered_set<uid_t> ¬ifyUidSet); // Stores current open session device info in temp file. void cacheDump(); void cacheDump(const std::string& cameraId); // Register an offline client for a given active camera id status_t addOfflineClient(const std::string &cameraId, sp<BasicClient> offlineClient); Loading services/camera/libcameraservice/common/Camera2ClientBase.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -293,7 +293,7 @@ binder::Status Camera2ClientBase<TClientBase>::disconnectImpl() { // deadlock while acquiring service lock in cacheDump. if (!TClientBase::mDisconnected) { ALOGD("Camera %s: start to cacheDump", TClientBase::mCameraIdStr.c_str()); Camera2ClientBase::getCameraService()->cacheDump(); Camera2ClientBase::getCameraService()->cacheDump(TClientBase::mCameraIdStr); } detachDevice(); Loading Loading
services/camera/libcameraservice/CameraService.cpp +7 −11 Original line number Diff line number Diff line Loading @@ -5534,7 +5534,7 @@ static bool tryLock(Mutex& mutex) return locked; } void CameraService::cacheDump() { void CameraService::cacheDump(const std::string& cameraId) { if (mMemFd != -1) { const Vector<String16> args; ATRACE_CALL(); Loading @@ -5542,10 +5542,7 @@ void CameraService::cacheDump() { // cacheDump will not be called during the second disconnect. Mutex::Autolock lock(mServiceLock); Mutex::Autolock l(mCameraStatesLock); // Start collecting the info for open sessions and store it in temp file. for (const auto& state : mCameraStates) { std::string cameraId = state.first; // Start collecting the info for calling camera Id and store it in temp file. auto clientDescriptor = mActiveClientManager.get(cameraId); if (clientDescriptor != nullptr) { dprintf(mMemFd, "== Camera device %s dynamic info: ==\n", cameraId.c_str()); Loading @@ -5554,7 +5551,6 @@ void CameraService::cacheDump() { } } } } status_t CameraService::dump(int fd, const Vector<String16>& args) { ATRACE_CALL(); Loading
services/camera/libcameraservice/CameraService.h +1 −1 Original line number Diff line number Diff line Loading @@ -286,7 +286,7 @@ public: void notifyMonitoredUids(const std::unordered_set<uid_t> ¬ifyUidSet); // Stores current open session device info in temp file. void cacheDump(); void cacheDump(const std::string& cameraId); // Register an offline client for a given active camera id status_t addOfflineClient(const std::string &cameraId, sp<BasicClient> offlineClient); Loading
services/camera/libcameraservice/common/Camera2ClientBase.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -293,7 +293,7 @@ binder::Status Camera2ClientBase<TClientBase>::disconnectImpl() { // deadlock while acquiring service lock in cacheDump. if (!TClientBase::mDisconnected) { ALOGD("Camera %s: start to cacheDump", TClientBase::mCameraIdStr.c_str()); Camera2ClientBase::getCameraService()->cacheDump(); Camera2ClientBase::getCameraService()->cacheDump(TClientBase::mCameraIdStr); } detachDevice(); Loading