android / android/camera-samples

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

Aperta
#289 0 commenti 0 reazioni 1 assegnatario Rivendicata da @owahltinez Vedi su GitHub
Lingua principale
Kotlin
Stelle
5.5k
Fork
2.4k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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]
```kotlin
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://gerrit.aospextended.com/plugins/gitiles/AospExtended/platform_frameworks_base/+/25df673b849de374cf1de40250dfd8a48b7ac28b/core/java/android/hardware/camera2/impl/CameraDevice.java#269

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.