Unhide QVGA related resolution profiles and allow to use QVGA resolution for timelapse video recording.
Change-Id: I328d9fa83a381415d7648218a6fb93b3724bbcc6
related-to-bug: 5343832
diff --git a/api/current.txt b/api/current.txt
index 0e32d88..b8e4ee9 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -10537,6 +10537,7 @@
field public static final int QUALITY_HIGH = 1; // 0x1
field public static final int QUALITY_LOW = 0; // 0x0
field public static final int QUALITY_QCIF = 2; // 0x2
+ field public static final int QUALITY_QVGA = 7; // 0x7
field public static final int QUALITY_TIME_LAPSE_1080P = 1006; // 0x3ee
field public static final int QUALITY_TIME_LAPSE_480P = 1004; // 0x3ec
field public static final int QUALITY_TIME_LAPSE_720P = 1005; // 0x3ed
@@ -10544,6 +10545,7 @@
field public static final int QUALITY_TIME_LAPSE_HIGH = 1001; // 0x3e9
field public static final int QUALITY_TIME_LAPSE_LOW = 1000; // 0x3e8
field public static final int QUALITY_TIME_LAPSE_QCIF = 1002; // 0x3ea
+ field public static final int QUALITY_TIME_LAPSE_QVGA = 1007; // 0x3ef
field public int audioBitRate;
field public int audioChannels;
field public int audioCodec;
diff --git a/media/java/android/media/CamcorderProfile.java b/media/java/android/media/CamcorderProfile.java
index 51a45cd..7d60c55 100644
--- a/media/java/android/media/CamcorderProfile.java
+++ b/media/java/android/media/CamcorderProfile.java
@@ -82,7 +82,6 @@
/**
* Quality level corresponding to the QVGA (320x240) resolution.
- * {@hide}
*/
public static final int QUALITY_QVGA = 7;
@@ -127,7 +126,6 @@
/**
* Time lapse quality level corresponding to the QVGA (320 x 240) resolution.
- * {@hide}
*/
public static final int QUALITY_TIME_LAPSE_QVGA = 1007;
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java
index 8f5d0e5..2a11d19 100644
--- a/media/java/android/media/MediaRecorder.java
+++ b/media/java/android/media/MediaRecorder.java
@@ -299,7 +299,7 @@
setVideoEncodingBitRate(profile.videoBitRate);
setVideoEncoder(profile.videoCodec);
if (profile.quality >= CamcorderProfile.QUALITY_TIME_LAPSE_LOW &&
- profile.quality <= CamcorderProfile.QUALITY_TIME_LAPSE_1080P) {
+ profile.quality <= CamcorderProfile.QUALITY_TIME_LAPSE_QVGA) {
// Enable time lapse. Also don't set audio for time lapse.
setParameter(String.format("time-lapse-enable=1"));
} else {