diff options
author | Sai Kumar Sanagavarapu <ssanagav@codeaurora.org> | 2015-02-27 13:07:16 +0530 |
---|---|---|
committer | Sai Kumar Sanagavarapu <ssanagav@codeaurora.org> | 2015-02-27 13:07:16 +0530 |
commit | 3e50703cff0bc243b922a2299c58a45a4cbd91a9 (patch) | |
tree | 6a8b40656cb22af6237755d29022025e82190259 /src | |
parent | ca6f7e139f4db45edc5e2d9b5ef7f827e1e94344 (diff) | |
download | android_packages_apps_Snap-3e50703cff0bc243b922a2299c58a45a4cbd91a9.tar.gz android_packages_apps_Snap-3e50703cff0bc243b922a2299c58a45a4cbd91a9.tar.bz2 android_packages_apps_Snap-3e50703cff0bc243b922a2299c58a45a4cbd91a9.zip |
SnapdragonCamera: Throw error popup for unsupported video profile.
Check if the quality selected has a matching camcorder profile
associated and show error popup if not supported.
Change-Id: If3e1e3d62b4e2e9c8c16b9e4a346cbfa93c0f92b
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/VideoModule.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 7d7120953..84273dbda 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -317,6 +317,7 @@ public class VideoModule implements CameraModule, private boolean mUnsupportedHSRVideoSize = false; private boolean mUnsupportedHFRVideoCodec = false; private String mDefaultAntibanding = null; + boolean mUnsupportedProfile = false; // This Handler is used to post message back onto the main thread of the // application @@ -824,6 +825,12 @@ public class VideoModule implements CameraModule, mCaptureTimeLapse = (mTimeBetweenTimeLapseFrameCaptureMs != 0); // TODO: This should be checked instead directly +1000. if (mCaptureTimeLapse) quality += 1000; + mUnsupportedProfile = false; + boolean hasProfile = CamcorderProfile.hasProfile(quality); + if (!hasProfile) { + mUnsupportedProfile = true; + return; + } mProfile = CamcorderProfile.get(mCameraId, quality); getDesiredPreviewSize(); qcomReadVideoPreferences(); @@ -1632,6 +1639,13 @@ public class VideoModule implements CameraModule, mStartRecPending = false; return; } + if (mUnsupportedProfile == true) { + Log.e(TAG, "Unsupported video profile"); + RotateTextToast.makeText(mActivity, R.string.error_app_unsupported_profile, + Toast.LENGTH_SHORT).show(); + mStartRecPending = false; + return; + } //?? //if (!mCameraDevice.waitDone()) return; mCurrentVideoUri = null; |