Merge "Camera: Avoid NPE when extension results are not supported" into tm-d1-dev

This commit is contained in:
TreeHugger Robot
2022-08-01 17:48:28 +00:00
committed by Android (Google) Code Review

View File

@@ -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);
mCaptureResultHandler.onCaptureCompleted(timestamp,
initializeFilteredResults(result));
if (mCaptureResultHandler != null) {
mCaptureResultHandler.onCaptureCompleted(timestamp,
initializeFilteredResults(result));
}
Log.w(TAG, "Preview frame drop with timestamp: " + previewMap.keyAt(i));
final long ident = Binder.clearCallingIdentity();