show an error if no profile has been retrieved at video recording

This commit is contained in:
tibbi 2018-01-23 16:37:19 +01:00
parent 91137228d2
commit 95e75b4e74
1 changed files with 5 additions and 0 deletions

View File

@ -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