Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The handler for setRepeatingRequest() can be null when callback is null. #289

Open
ecoopnet opened this issue Aug 27, 2020 · 0 comments
Open
Assignees

Comments

@ecoopnet
Copy link

ecoopnet commented Aug 27, 2020

The argument Handler of CameraCaptureSession.setRepeatingRequest() can be null when callback is null because it is never used.

For [example](https://github.com/android/camera-samples/blob/2b446855ca2662db42ff1755968f6af495c2a962/Camera2Video/app/src/main/java/com/example/android/camera2/video/fragments/CameraFragment.kt#L253]

session.setRepeatingRequest(previewRequest, null, cameraHandler)

In document of CameraCaptureSession.setRepeatingRequest() says that the parameter handler is the handler on which the listener should be invoked. So If the listener is null, the handler can be null.

I also looked at the setRepeatingRequest source code to be sure, but the handler is not used when the callback is null.

http:https://gerrit.aospextended.com/plugins/gitiles/AospExtended/platform_frameworks_base/+/25df673b849de374cf1de40250dfd8a48b7ac28b/core/java/android/hardware/camera2/impl/CameraDevice.java#269

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants