Skip to content

Commit

Permalink
Hotfix/fix android example for focus mode continuous picture - tensor…
Browse files Browse the repository at this point in the history
…flow#15487 (tensorflow#15489)

* fixed tensorflow#15487

* fixed tensorflow#15487

* simplify and tweak formatting to TF style
  • Loading branch information
armando-fandango authored and rmlarsen committed Jan 26, 2018
1 parent 0086c55 commit 73cf824
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,11 @@ public void onSurfaceTextureAvailable(

try {
Camera.Parameters parameters = camera.getParameters();
parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);

List<String> focusModes = parameters.getSupportedFocusModes();
if (focusModes != null
&& focusModes.contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE)) {
parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);
}
List<Camera.Size> cameraSizes = parameters.getSupportedPreviewSizes();
Size[] sizes = new Size[cameraSizes.size()];
int i = 0;
Expand Down

0 comments on commit 73cf824

Please sign in to comment.