Skip to content

Commit

Permalink
Fix variable name and space.
Browse files Browse the repository at this point in the history
  • Loading branch information
H1Gdev committed Sep 20, 2019
1 parent ae64098 commit 8bc134e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public void onSurfaceTextureUpdated(SurfaceTexture texture) {

@Override
public void onOpened(@NonNull CameraDevice cameraDevice) {
// This method is called when the camera is opened. We start camera preview here.
// This method is called when the camera is opened. We start camera preview here.
mCameraOpenCloseLock.release();
mCameraDevice = cameraDevice;
createCameraPreviewSession();
Expand Down Expand Up @@ -562,7 +562,7 @@ private void setUpCameraOutputs(int width, int height) {
maxPreviewHeight = MAX_PREVIEW_HEIGHT;
}

// Danger, W.R.! Attempting to use too large a preview size could exceed the camera
// Danger, W.R.! Attempting to use too large a preview size could exceed the camera
// bus' bandwidth limitation, resulting in gorgeous previews but the storage of
// garbage capture data.
mPreviewSize = chooseOptimalSize(map.getOutputSizes(SurfaceTexture.class),
Expand Down Expand Up @@ -828,7 +828,7 @@ private void captureStillPicture() {
int rotation = activity.getWindowManager().getDefaultDisplay().getRotation();
captureBuilder.set(CaptureRequest.JPEG_ORIENTATION, getOrientation(rotation));

CameraCaptureSession.CaptureCallback CaptureCallback
CameraCaptureSession.CaptureCallback captureCallback
= new CameraCaptureSession.CaptureCallback() {

@Override
Expand All @@ -843,7 +843,7 @@ public void onCaptureCompleted(@NonNull CameraCaptureSession session,

mCaptureSession.stopRepeating();
mCaptureSession.abortCaptures();
mCaptureSession.capture(captureBuilder.build(), CaptureCallback, null);
mCaptureSession.capture(captureBuilder.build(), captureCallback, null);
} catch (CameraAccessException e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ class Camera2BasicFragment : Fragment(), View.OnClickListener,
if (maxPreviewWidth > MAX_PREVIEW_WIDTH) maxPreviewWidth = MAX_PREVIEW_WIDTH
if (maxPreviewHeight > MAX_PREVIEW_HEIGHT) maxPreviewHeight = MAX_PREVIEW_HEIGHT

// Danger, W.R.! Attempting to use too large a preview size could exceed the camera
// Danger, W.R.! Attempting to use too large a preview size could exceed the camera
// bus' bandwidth limitation, resulting in gorgeous previews but the storage of
// garbage capture data.
previewSize = chooseOptimalSize(map.getOutputSizes(SurfaceTexture::class.java),
Expand Down

0 comments on commit 8bc134e

Please sign in to comment.