Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[scenario] trigger firstFrameLatch on exception. #50981

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,11 @@ private void onImageAvailable(ImageReader reader) {
// IllegalStateException.
// Simply log and return.
Log.i(TAG, "Surface disconnected from ImageWriter", e);

if (onFirstFrame != null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:

move this to a finally block and get rid of the other one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...alternatively don't return in the catch block

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

onFirstFrame.countDown();
onFirstFrame = null;
}
image.close();
return;
}
Expand Down