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

Commit 05a93a3a authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix null deref in camera service" into main am: ef703eef

parents 49b9a4b3 ef703eef
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2462,6 +2462,11 @@ Status CameraService::notifySystemEvent(int32_t eventId,
        }
        case ICameraService::EVENT_USB_DEVICE_ATTACHED:
        case ICameraService::EVENT_USB_DEVICE_DETACHED: {
            if (args.size() != 1) {
                return Status::fromExceptionCode(Status::EX_ILLEGAL_ARGUMENT,
                    "USB Device Event requires 1 argument");
            }

            // Notify CameraProviderManager for lazy HALs
            mCameraProviderManager->notifyUsbDeviceEvent(eventId,
                                                        std::to_string(args[0]));