diff options
Diffstat (limited to 'src/com/android/camera/CameraSettings.java')
-rw-r--r-- | src/com/android/camera/CameraSettings.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java index 50bd9d8..06a8d95 100644 --- a/src/com/android/camera/CameraSettings.java +++ b/src/com/android/camera/CameraSettings.java @@ -364,6 +364,17 @@ public class CameraSettings { editor.apply(); } + public static int readExposure(ComboPreferences preferences) { + String exposure = preferences.getString( + CameraSettings.KEY_EXPOSURE, + EXPOSURE_DEFAULT_VALUE); + try { + return Integer.parseInt(exposure); + } catch (Exception ex) { + Log.e(TAG, "Invalid exposure: " + exposure); + } + return 0; + } public static void restorePreferences(Context context, ComboPreferences preferences, Parameters parameters) { |