From 706bd006d25aa8f322a9807eda6183a3941ad2c6 Mon Sep 17 00:00:00 2001 From: Owen Lin Date: Thu, 18 Mar 2010 10:49:20 +0800 Subject: Fix the picture size settings doesn't get initialized issue. Bug: 2524062 Change-Id: Ia1062a23572dce7acc00a6877b92d088bc62aae6 --- src/com/android/camera/ui/HeadUpDisplay.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/com/android/camera/ui/HeadUpDisplay.java') 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(); -- cgit v1.1