Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bfc35ede authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "CameraService: Increase watchdog timer" into main

parents fd04170b c1698225
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@
        watchThread([&]() { return toMonitor;}, gettid(), __FUNCTION__, cycles, cycleLength);

// Default cycles and cycle length values used to calculate permitted elapsed time
const static size_t   kMaxCycles     = 100;
const static size_t   kMaxCycles     = 650;
const static uint32_t kCycleLengthMs = 100;

namespace android {
+1 −8
Original line number Diff line number Diff line
@@ -269,15 +269,8 @@ status_t Camera2ClientBase<TClientBase>::dumpDevice(
template <typename TClientBase>
binder::Status Camera2ClientBase<TClientBase>::disconnect() {
    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(),
                maxExpectedDuration / kCycleLengthMs, kCycleLengthMs);
        return mCameraServiceWatchdog->WATCH(disconnectImpl());
    }
    return disconnectImpl();
}
+0 −3
Original line number Diff line number Diff line
@@ -137,9 +137,6 @@ 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;