@@ -80,6 +80,16 @@ public class CamcorderProfile
8080 */
8181 public static final int QUALITY_1080P = 6 ;
8282
83+ /**
84+ * Quality level corresponding to the QVGA (320x240) resolution.
85+ * {@hide}
86+ */
87+ public static final int QUALITY_QVGA = 7 ;
88+
89+ // Start and end of quality list
90+ private static final int QUALITY_LIST_START = QUALITY_LOW ;
91+ private static final int QUALITY_LIST_END = QUALITY_QVGA ;
92+
8393 /**
8494 * Time lapse quality level corresponding to the lowest available resolution.
8595 */
@@ -115,6 +125,16 @@ public class CamcorderProfile
115125 */
116126 public static final int QUALITY_TIME_LAPSE_1080P = 1006 ;
117127
128+ /**
129+ * Time lapse quality level corresponding to the QVGA (320 x 240) resolution.
130+ * {@hide}
131+ */
132+ public static final int QUALITY_TIME_LAPSE_QVGA = 1007 ;
133+
134+ // Start and end of timelapse quality list
135+ private static final int QUALITY_TIME_LAPSE_LIST_START = QUALITY_TIME_LAPSE_LOW ;
136+ private static final int QUALITY_TIME_LAPSE_LIST_END = QUALITY_TIME_LAPSE_QVGA ;
137+
118138 /**
119139 * Default recording duration in seconds before the session is terminated.
120140 * This is useful for applications like MMS has limited file size requirement.
@@ -238,8 +258,10 @@ public static CamcorderProfile get(int quality) {
238258 * @see #QUALITY_TIME_LAPSE_1080P
239259 */
240260 public static CamcorderProfile get (int cameraId , int quality ) {
241- if (!((quality >= QUALITY_LOW && quality <= QUALITY_1080P ) ||
242- (quality >= QUALITY_TIME_LAPSE_LOW && quality <= QUALITY_TIME_LAPSE_1080P ))) {
261+ if (!((quality >= QUALITY_LIST_START &&
262+ quality <= QUALITY_LIST_END ) ||
263+ (quality >= QUALITY_TIME_LAPSE_LIST_START &&
264+ quality <= QUALITY_TIME_LAPSE_LIST_END ))) {
243265 String errMessage = "Unsupported quality level: " + quality ;
244266 throw new IllegalArgumentException (errMessage );
245267 }
0 commit comments