OSDN Git Service

Fix the bug focus bracket may appear in infinite focus mode.
authorWu-cheng Li <wuchengli@google.com>
Fri, 22 Jan 2010 09:54:17 +0000 (17:54 +0800)
committerWu-cheng Li <wuchengli@google.com>
Fri, 22 Jan 2010 10:43:26 +0000 (18:43 +0800)
bug:2247217

src/com/android/camera/Camera.java

index fb3ede8..8155885 100644 (file)
@@ -289,7 +289,8 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
         // Initialize location sevice.
         mLocationManager = (LocationManager)
                 getSystemService(Context.LOCATION_SERVICE);
-        readPreference();
+        mRecordLocation = RecordLocationPreference.get(
+                mPreferences, getContentResolver());
         if (mRecordLocation) startReceivingLocationUpdates();
 
         keepMediaProviderInstance();
@@ -347,7 +348,8 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
         mOrientationListener.enable();
 
         // Start location update if needed.
-        readPreference();
+        mRecordLocation = RecordLocationPreference.get(
+                mPreferences, getContentResolver());
         if (mRecordLocation) startReceivingLocationUpdates();
 
         installIntentFilter();
@@ -1319,14 +1321,6 @@ public class Camera extends NoSearchActivity implements View.OnClickListener,
         }
     }
 
-    private void readPreference() {
-        mRecordLocation = RecordLocationPreference.get(
-                mPreferences, getContentResolver());
-        mFocusMode = mPreferences.getString(
-                CameraSettings.KEY_FOCUS_MODE,
-                getString(R.string.pref_camera_focusmode_default));
-    }
-
     @Override
     public void onResume() {
         super.onResume();