summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/ComboPreferences.java
diff options
context:
space:
mode:
authorWu-cheng Li <wuchengli@google.com>2011-02-28 18:30:22 +0800
committerWu-cheng Li <wuchengli@google.com>2011-02-28 18:38:43 +0800
commit4a70e66b58207703f8a705548efcd5353106e452 (patch)
treecaab44fe72261abb2c313d704920918beb7775e4 /src/com/android/camera/ComboPreferences.java
parent842b44f24ab621122183a149e20a852e5d8e0200 (diff)
downloadpackages_apps_LegacyCamera-4a70e66b58207703f8a705548efcd5353106e452.tar.gz
packages_apps_LegacyCamera-4a70e66b58207703f8a705548efcd5353106e452.tar.bz2
packages_apps_LegacyCamera-4a70e66b58207703f8a705548efcd5353106e452.zip
Fix settings are not retained when we toggle from still & video mode.
"Restore defaults" clears the preferences of both cameras. Previously the preferences variable was incorrectly pointed to the preferences of front camera after restore defaults. After that, any camera setting change were written to the front camera even if the current camera is back camera. bug:3417946 Change-Id: I675ccd20bfdf9d44e53e90238c410228b55ee376
Diffstat (limited to 'src/com/android/camera/ComboPreferences.java')
-rw-r--r--src/com/android/camera/ComboPreferences.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/com/android/camera/ComboPreferences.java b/src/com/android/camera/ComboPreferences.java
index f613d764..b8705ccc 100644
--- a/src/com/android/camera/ComboPreferences.java
+++ b/src/com/android/camera/ComboPreferences.java
@@ -49,6 +49,8 @@ public class ComboPreferences implements SharedPreferences, OnSharedPreferenceCh
}
}
+ // Sets the camera id and reads its preferences. Each camera has its own
+ // preferences.
public void setLocalId(Context context, int cameraId) {
String prefName = context.getPackageName() + "_preferences_" + cameraId;
if (mPrefLocal != null) {