Loading services/camera/libcameraservice/common/Camera2ClientBase.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -40,8 +40,6 @@ namespace android { const static size_t kDisconnectTimeoutMs = 2500; using namespace camera2; // Interface used by CameraService Loading Loading @@ -266,10 +264,16 @@ status_t Camera2ClientBase<TClientBase>::dumpDevice( template <typename TClientBase> binder::Status Camera2ClientBase<TClientBase>::disconnect() { if (mCameraServiceWatchdog != nullptr) { if (mCameraServiceWatchdog != nullptr && mDevice != nullptr) { // Timer for the disconnect call should be greater than getExpectedInFlightDuration // since this duration is used to error handle methods in the disconnect sequence // thus allowing existing error handling methods to execute first uint64_t maxExpectedDuration = ns2ms(mDevice->getExpectedInFlightDuration() + kBufferTimeDisconnectNs); // Initialization from hal succeeded, time disconnect. return mCameraServiceWatchdog->WATCH_CUSTOM_TIMER(disconnectImpl(), kDisconnectTimeoutMs / kCycleLengthMs, kCycleLengthMs); maxExpectedDuration / kCycleLengthMs, kCycleLengthMs); } return disconnectImpl(); } Loading services/camera/libcameraservice/common/Camera2ClientBase.h +3 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,9 @@ public: protected: // Used for watchdog timeout to monitor disconnect static const nsecs_t kBufferTimeDisconnectNs = 3000000000; // 3 sec. // The PID provided in the constructor call pid_t mInitialClientPid; bool mOverrideForPerfClass = false; Loading services/camera/libcameraservice/device3/Camera3Device.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1744,7 +1744,7 @@ status_t Camera3Device::flush(int64_t *frameNumber) { } // Calculate expected duration for flush with additional buffer time in ms for watchdog uint64_t maxExpectedDuration = (getExpectedInFlightDuration() + kBaseGetBufferWait) / 1e6; uint64_t maxExpectedDuration = ns2ms(getExpectedInFlightDuration() + kBaseGetBufferWait); status_t res = mCameraServiceWatchdog->WATCH_CUSTOM_TIMER(mRequestThread->flush(), maxExpectedDuration / kCycleLengthMs, kCycleLengthMs); Loading Loading
services/camera/libcameraservice/common/Camera2ClientBase.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -40,8 +40,6 @@ namespace android { const static size_t kDisconnectTimeoutMs = 2500; using namespace camera2; // Interface used by CameraService Loading Loading @@ -266,10 +264,16 @@ status_t Camera2ClientBase<TClientBase>::dumpDevice( template <typename TClientBase> binder::Status Camera2ClientBase<TClientBase>::disconnect() { if (mCameraServiceWatchdog != nullptr) { if (mCameraServiceWatchdog != nullptr && mDevice != nullptr) { // Timer for the disconnect call should be greater than getExpectedInFlightDuration // since this duration is used to error handle methods in the disconnect sequence // thus allowing existing error handling methods to execute first uint64_t maxExpectedDuration = ns2ms(mDevice->getExpectedInFlightDuration() + kBufferTimeDisconnectNs); // Initialization from hal succeeded, time disconnect. return mCameraServiceWatchdog->WATCH_CUSTOM_TIMER(disconnectImpl(), kDisconnectTimeoutMs / kCycleLengthMs, kCycleLengthMs); maxExpectedDuration / kCycleLengthMs, kCycleLengthMs); } return disconnectImpl(); } Loading
services/camera/libcameraservice/common/Camera2ClientBase.h +3 −0 Original line number Diff line number Diff line Loading @@ -134,6 +134,9 @@ public: protected: // Used for watchdog timeout to monitor disconnect static const nsecs_t kBufferTimeDisconnectNs = 3000000000; // 3 sec. // The PID provided in the constructor call pid_t mInitialClientPid; bool mOverrideForPerfClass = false; Loading
services/camera/libcameraservice/device3/Camera3Device.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1744,7 +1744,7 @@ status_t Camera3Device::flush(int64_t *frameNumber) { } // Calculate expected duration for flush with additional buffer time in ms for watchdog uint64_t maxExpectedDuration = (getExpectedInFlightDuration() + kBaseGetBufferWait) / 1e6; uint64_t maxExpectedDuration = ns2ms(getExpectedInFlightDuration() + kBaseGetBufferWait); status_t res = mCameraServiceWatchdog->WATCH_CUSTOM_TIMER(mRequestThread->flush(), maxExpectedDuration / kCycleLengthMs, kCycleLengthMs); Loading