summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPawit Pornkitprasan <p.pawit@gmail.com>2014-11-19 22:29:34 +0700
committerMichael Bestas <mikeioannina@gmail.com>2016-12-30 17:17:51 +0200
commitaf65ec3306f3006d12429e0cbcdc735a7bbec013 (patch)
treeef14e4755c6a7e2032fb7f35a3749100e1ebcc12 /src
parent06f6ad41b4ce76d476601848ff8d80e7bcacaf1f (diff)
downloadandroid_packages_apps_Camera2-af65ec3306f3006d12429e0cbcdc735a7bbec013.tar.gz
android_packages_apps_Camera2-af65ec3306f3006d12429e0cbcdc735a7bbec013.tar.bz2
android_packages_apps_Camera2-af65ec3306f3006d12429e0cbcdc735a7bbec013.zip
Camera2: fix video recording for older drivers
Older drivers need the preview size to be the same as the video size. This check is done in getDesiredPreviewSize but was broken because CameraCapabilities return an empty list instead of null. Change-Id: If4d570923bd4809c8e651831a061414836e01a36
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/VideoModule.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 9a941c73e..48f8b6c8d 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -808,7 +808,7 @@ public class VideoModule extends CameraModule
*/
private static Point getDesiredPreviewSize(CameraCapabilities capabilities,
CamcorderProfile profile, Point previewScreenSize) {
- if (capabilities.getSupportedVideoSizes() == null) {
+ if (capabilities.getSupportedVideoSizes().size() == 0) {
// Driver doesn't support separate outputs for preview and video.
return new Point(profile.videoFrameWidth, profile.videoFrameHeight);
}