move getSelectedResolution inside the camera null check

This commit is contained in:
tibbi 2017-06-16 21:19:59 +02:00
parent b7615013aa
commit 811cfbf668

View File

@ -378,8 +378,8 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan
}
fun showChangeResolutionDialog() {
val oldResolution = getSelectedResolution()
if (mCamera != null) {
val oldResolution = getSelectedResolution()
ChangeResolutionDialog(mActivity, config, mCamera!!) {
if (oldResolution != getSelectedResolution()) {
refreshPreview()