show an error if no profile has been retrieved at video recording
This commit is contained in:
parent
91137228d2
commit
95e75b4e74
|
@ -636,6 +636,11 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan
|
|||
CamcorderProfile.get(CamcorderProfile.QUALITY_LOW)
|
||||
}
|
||||
|
||||
if (profile == null) {
|
||||
mActivity?.toast(R.string.unknown_error_occurred)
|
||||
return false
|
||||
}
|
||||
|
||||
profile.apply {
|
||||
videoFrameWidth = resolution.width
|
||||
videoFrameHeight = resolution.height
|
||||
|
|
Loading…
Reference in New Issue