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

Commit 61e0e99a authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9084753 from e8dec5ff to tm-qpr1-release

Change-Id: Ib20ba402db5468fcbf0032ae4a0c439884e82584
parents e3d0811f e8dec5ff
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1973,7 +1973,6 @@ void CCodec::initiateRelease(bool sendCallback /* = true */) {
    }

    mChannel->reset();
    mChannel->stopUseOutputSurface();
    // thiz holds strong ref to this while the thread is running.
    sp<CCodec> thiz(this);
    std::thread([thiz, sendCallback] { thiz->release(sendCallback); }).detach();
@@ -1994,6 +1993,7 @@ void CCodec::release(bool sendCallback) {
        comp = state->comp;
    }
    comp->release();
    mChannel->stopUseOutputSurface();

    {
        Mutexed<State>::Locked state(mState);
+7 −0
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@

#include <aidl/android/hardware/camera/device/ICameraInjectionSession.h>
#include <aidlcommonsupport/NativeHandle.h>
#include <android/binder_ibinder_platform.h>
#include <android/hardware/camera2/ICameraDeviceUser.h>

#include "utils/CameraTraces.h"
@@ -669,6 +670,12 @@ status_t AidlCamera3Device::switchToOffline(
    return p->returnStreamBuffers(buffers);
}

::ndk::SpAIBinder AidlCamera3Device::AidlCameraDeviceCallbacks::createBinder() {
    auto binder = BnCameraDeviceCallback::createBinder();
    AIBinder_setInheritRt(binder.get(), /*inheritRt*/ true);
    return binder;
}

::ndk::ScopedAStatus AidlCamera3Device::returnStreamBuffers(
        const std::vector<camera::device::StreamBuffer>& buffers) {
    ReturnBufferStates states {
+4 −0
Original line number Diff line number Diff line
@@ -242,6 +242,10 @@ class AidlCamera3Device :
        ::ndk::ScopedAStatus returnStreamBuffers(
                const std::vector<
                        aidl::android::hardware::camera::device::StreamBuffer>& buffers) override;

        protected:
        ::ndk::SpAIBinder createBinder() override;

        private:
            wp<AidlCamera3Device> mParent = nullptr;
    };
+7 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include <utils/Trace.h>

#include <android/hardware/camera2/ICameraDeviceCallbacks.h>
#include <android/binder_ibinder_platform.h>

#include "device3/aidl/AidlCamera3OfflineSession.h"
#include "device3/Camera3OutputStream.h"
@@ -218,6 +219,12 @@ status_t AidlCamera3OfflineSession::initialize(wp<NotificationListener> listener
    return p->returnStreamBuffers(buffers);
}

::ndk::SpAIBinder AidlCamera3OfflineSession::AidlCameraDeviceCallbacks::createBinder() {
    auto binder = BnCameraDeviceCallback::createBinder();
    AIBinder_setInheritRt(binder.get(), /*inheritRt*/ true);
    return binder;
}

::ndk::ScopedAStatus AidlCamera3OfflineSession::returnStreamBuffers(
        const std::vector<camera::device::StreamBuffer>& buffers) {
    {
+4 −0
Original line number Diff line number Diff line
@@ -97,6 +97,10 @@ class AidlCamera3OfflineSession :
        ::ndk::ScopedAStatus returnStreamBuffers(
                const std::vector<
                        aidl::android::hardware::camera::device::StreamBuffer>& buffers) override;
        protected:

        ::ndk::SpAIBinder createBinder() override;

        private:
            wp<AidlCamera3OfflineSession> mParent = nullptr;
    };