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

Commit 671d613b authored by Emilian Peev's avatar Emilian Peev
Browse files

Camera: Avoid NPE when extension results are not supported

Bug: 240017175
Test: atest -c -d cts/tests/camera/src/android/hardware/camera2/cts/CameraExtensionSessionTest.java#testRepeatingAndCaptureCombined
Change-Id: I0b82039a103ac2a55f71a6aea505d7c7c696d7be
parent 7cdfd75b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1693,8 +1693,10 @@ public final class CameraExtensionSessionImpl extends CameraExtensionSession {
                        ((i != idx) || notifyCurrentIndex)) {
                    TotalCaptureResult result = previewMap.valueAt(i).second;
                    Long timestamp = result.get(CaptureResult.SENSOR_TIMESTAMP);
                    if (mCaptureResultHandler != null) {
                        mCaptureResultHandler.onCaptureCompleted(timestamp,
                                initializeFilteredResults(result));
                    }

                    Log.w(TAG, "Preview frame drop with timestamp: " + previewMap.keyAt(i));
                    final long ident = Binder.clearCallingIdentity();