This commit is contained in:
Lili Wei 2018-02-22 23:20:44 +08:00
parent 8aebf0045e
commit 1c4543f468
1 changed files with 4 additions and 0 deletions

View File

@ -159,6 +159,10 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan
mSupportedPreviewSizes = mParameters!!.supportedPreviewSizes.sortedByDescending { it.width * it.height }
refreshPreview()
if ("Nexus 4".equals(Build.MODEL)) {
mParameters!!.setRecordingHint(true)
}
val focusModes = mParameters!!.supportedFocusModes
if (focusModes.contains(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE))
mParameters!!.focusMode = Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE