diff options
author | Owen Lin <owenlin@google.com> | 2010-03-18 10:49:20 +0800 |
---|---|---|
committer | Owen Lin <owenlin@google.com> | 2010-03-19 11:17:50 +0800 |
commit | 706bd006d25aa8f322a9807eda6183a3941ad2c6 (patch) | |
tree | b4ec1c7660cdd8984fbb747877b7a3ce46f3083b /src/com/android/camera/ui/HeadUpDisplay.java | |
parent | 538a045b9761880dfaffc1f2c09c1e57c81706b5 (diff) | |
download | LegacyCamera-706bd006d25aa8f322a9807eda6183a3941ad2c6.zip LegacyCamera-706bd006d25aa8f322a9807eda6183a3941ad2c6.tar.gz LegacyCamera-706bd006d25aa8f322a9807eda6183a3941ad2c6.tar.bz2 |
Fix the picture size settings doesn't get initialized issue.
Bug: 2524062
Change-Id: Ia1062a23572dce7acc00a6877b92d088bc62aae6
Diffstat (limited to 'src/com/android/camera/ui/HeadUpDisplay.java')
-rw-r--r-- | src/com/android/camera/ui/HeadUpDisplay.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/camera/ui/HeadUpDisplay.java b/src/com/android/camera/ui/HeadUpDisplay.java index d3a9566..d441efe 100644 --- a/src/com/android/camera/ui/HeadUpDisplay.java +++ b/src/com/android/camera/ui/HeadUpDisplay.java @@ -6,6 +6,7 @@ import android.content.SharedPreferences; import android.content.SharedPreferences.Editor; import android.content.SharedPreferences.OnSharedPreferenceChangeListener; import android.graphics.Rect; +import android.hardware.Camera.Parameters; import android.os.Handler; import android.os.HandlerThread; import android.os.Message; @@ -391,7 +392,7 @@ public class HeadUpDisplay extends GLView { mListener = listener; } - public void restorePreferences() { + public void restorePreferences(final Parameters param) { getGLRootView().runInGLThread(new Runnable() { public void run() { OnSharedPreferenceChangeListener l = @@ -400,12 +401,14 @@ public class HeadUpDisplay extends GLView { // change bunch of preferences. We can handle them with one // onSharedPreferencesChanged(); mSharedPrefs.unregisterOnSharedPreferenceChangeListener(l); + Context context = getGLRootView().getContext(); synchronized (mSharedPrefs) { Editor editor = mSharedPrefs.edit(); editor.clear(); editor.commit(); } CameraSettings.upgradePreferences(mSharedPrefs); + CameraSettings.initialCameraPictureSize(context, param); reloadPreferences(); if (mListener != null) { mListener.onSharedPreferencesChanged(); |