summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-02-04 16:05:40 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2014-02-04 16:05:40 -0800
commit403df9af8bfb0a6e5eba97d620f82bf3c34645d6 (patch)
tree21075fb820bf88584a90433aea0e9513286c5497
parentf882dd2321f97fc69a6a69dd42a9e97a6fadb982 (diff)
parent1e60804c2d3a649c31cc0cf2961beb3b289edaab (diff)
downloadandroid_packages_apps_Snap-403df9af8bfb0a6e5eba97d620f82bf3c34645d6.tar.gz
android_packages_apps_Snap-403df9af8bfb0a6e5eba97d620f82bf3c34645d6.tar.bz2
android_packages_apps_Snap-403df9af8bfb0a6e5eba97d620f82bf3c34645d6.zip
Merge "camera: fix camera crash in hfr"
-rw-r--r--src/com/android/camera/VideoModule.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 098545ac8..b5292b2f2 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -1785,14 +1785,17 @@ public class VideoModule implements CameraModule,
String hfrsize = videoWidth+"x"+videoHeight;
Log.v(TAG, "current set resolution is : "+hfrsize);
try {
- for(Size size : mParameters.getSupportedHfrSizes()){
- if(size != null) {
- Log.v(TAG, "supported hfr size : "+ size.width+ " "+size.height);
- if(videoWidth <= size.width && videoHeight <= size.height) {
- mUnsupportedHFRVideoSize = false;
- Log.v(TAG,"Current hfr resolution is supported");
- break;
- }
+ Size size = null;
+ if (isSupported(HighFrameRate,mParameters.getSupportedVideoHighFrameRateModes())) {
+ int index = mParameters.getSupportedVideoHighFrameRateModes().indexOf(
+ HighFrameRate);
+ size = mParameters.getSupportedHfrSizes().get(index);
+ }
+ if (size != null) {
+ Log.v(TAG, "supported hfr size : "+ size.width+ " "+size.height);
+ if (videoWidth <= size.width && videoHeight <= size.height) {
+ mUnsupportedHFRVideoSize = false;
+ Log.v(TAG,"Current hfr resolution is supported");
}
}
} catch (NullPointerException e){