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

Commit 0a48dc03 authored by Ravneet Dhanjal's avatar Ravneet Dhanjal Committed by Android (Google) Code Review
Browse files

Merge "Remove duplicate watchdog monitoring for disconnect/close" into main

parents 5377f5c6 baa324b1
Loading
Loading
Loading
Loading
+1 −19
Original line number Diff line number Diff line
@@ -157,16 +157,6 @@ status_t Camera2ClientBase<TClientBase>::initializeImpl(TProviderPtr providerPtr
        return res;
    }

    /** Start watchdog thread */
    mCameraServiceWatchdog = new CameraServiceWatchdog(TClientBase::mCameraIdStr,
            mCameraServiceProxyWrapper);
    res = mCameraServiceWatchdog->run("Camera2ClientBaseWatchdog");
    if (res != OK) {
        ALOGE("%s: Unable to start camera service watchdog thread: %s (%d)",
                __FUNCTION__, strerror(-res), res);
        return res;
    }

    return OK;
}

@@ -178,11 +168,6 @@ Camera2ClientBase<TClientBase>::~Camera2ClientBase() {

    disconnect();

    if (mCameraServiceWatchdog != NULL) {
        mCameraServiceWatchdog->requestExit();
        mCameraServiceWatchdog.clear();
    }

    ALOGI("%s: Client object's dtor for Camera Id %s completed. Client was: %s (PID %d, UID %u)",
            __FUNCTION__, TClientBase::mCameraIdStr.c_str(),
            TClientBase::mClientPackageName.c_str(),
@@ -268,10 +253,7 @@ status_t Camera2ClientBase<TClientBase>::dumpDevice(

template <typename TClientBase>
binder::Status Camera2ClientBase<TClientBase>::disconnect() {
    if (mCameraServiceWatchdog != nullptr && mDevice != nullptr) {
        // Initialization from hal succeeded, time disconnect.
        return mCameraServiceWatchdog->WATCH(disconnectImpl());
    }

    return disconnectImpl();
}

+0 −3
Original line number Diff line number Diff line
@@ -184,9 +184,6 @@ private:

    binder::Status disconnectImpl();

    // Watchdog thread
    sp<CameraServiceWatchdog> mCameraServiceWatchdog;

};

}; // namespace android