summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/camera/Camera.java11
-rw-r--r--src/com/android/camera/CameraSettings.java5
2 files changed, 6 insertions, 10 deletions
diff --git a/src/com/android/camera/Camera.java b/src/com/android/camera/Camera.java
index cbb6aa1..b3dd504 100644
--- a/src/com/android/camera/Camera.java
+++ b/src/com/android/camera/Camera.java
@@ -37,6 +37,7 @@ import android.location.LocationManager;
import android.location.LocationProvider;
import android.media.AudioManager;
import android.media.ToneGenerator;
+import android.media.CameraProfile;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
@@ -2161,8 +2162,7 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
}
private static String[] mQualityStrings = {"superfine", "fine", "normal"};
- private static String[] mQualityNumbers = SystemProperties.get(
- "ro.media.enc.jpeg.quality", "85,75,65").split(",");
+ private static int[] mQualityNumbers = CameraProfile.getImageEncodingQualityLevels();
private static int DEFAULT_QUALITY = 85;
// Translate from a quality string to a quality number using the system
@@ -2174,12 +2174,7 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
if (index == -1 || index > mQualityNumbers.length - 1) {
return DEFAULT_QUALITY;
}
-
- try {
- return Integer.parseInt(mQualityNumbers[index]);
- } catch (NumberFormatException ex) {
- return DEFAULT_QUALITY;
- }
+ return mQualityNumbers[index];
}
}
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index db82a75..6df7803 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -20,6 +20,8 @@ import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.drawable.Drawable;
+import android.media.CamcorderProfile;
+import android.media.CamcorderProfile.Quality;
import android.hardware.Camera.Parameters;
import android.hardware.Camera.Size;
import android.os.SystemProperties;
@@ -60,8 +62,7 @@ public class CameraSettings {
public static final int CURRENT_VERSION = 3;
// max mms video duration in seconds.
- public static final int MMS_VIDEO_DURATION =
- SystemProperties.getInt("ro.media.enc.lprof.duration", 60);
+ public static final int MMS_VIDEO_DURATION = CamcorderProfile.getMmsRecordingDurationInSeconds();
public static final boolean DEFAULT_VIDEO_QUALITY_VALUE = true;