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

Commit 3f20d19b authored by Jayant Chowdhary's avatar Jayant Chowdhary
Browse files

cameraservice: Check for watchdog initialization before timing disconnect.



Bug: 234330877
Bug: 234544015

Test: atest MultiViewTest#testDualCameraPreview passes

Change-Id: I665851f10eb2153844a3dbe248b5b4dae756dc50
Signed-off-by: default avatarJayant Chowdhary <jchowdhary@google.com>
parent 48162a77
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -248,9 +248,13 @@ status_t Camera2ClientBase<TClientBase>::dumpDevice(

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

template <typename TClientBase>
binder::Status Camera2ClientBase<TClientBase>::disconnectImpl() {