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

Commit edfb2606 authored by Jayant Chowdhary's avatar Jayant Chowdhary
Browse files

cameraserver: Fix logic to skip callbacks for non HAL3 devices for vendor listeners.



Fixes regression caused by aosp/1152176, status update callbacks were being skipped
for non HAL3 devices for non vendor listeners. Non vendor listeners
should still get callbacks in case of non HAL3 devices.

Bug: 150180641

Test: Camera2 App
Test: CTS
Test: Use vendor clients of cameraserver
Test: Vendor testing

Merged-In: Ic31f71887b55f3d838ca35274a5f65802ea50584
Change-Id: Ifab0be4dac4b42f6923ce48ab57aeb0aaf26575b
Signed-off-by: default avatarJayant Chowdhary <jchowdhary@google.com>
parent 550fef91
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -3309,8 +3309,15 @@ void CameraService::updateStatus(StatusInternal status, const String8& cameraId,
            Mutex::Autolock lock(mStatusListenerLock);

            for (auto& listener : mListenerList) {
                if (!listener.first &&  (isHidden || !supportsHAL3)) {
                    ALOGV("Skipping camera discovery callback for system-only / HAL1 camera %s",
                bool isVendorListener = listener.first;
                if (isVendorListener && !supportsHAL3) {
                    ALOGV("Skipping vendor listener camera discovery callback for  HAL1 camera %s",
                            cameraId.c_str());
                    continue;
                }

                if (!isVendorListener && isHidden) {
                    ALOGV("Skipping camera discovery callback for system-only camera %s",
                          cameraId.c_str());
                    continue;
                }