Snapcam: reload charactertics when enter setting

reload charactertics when enter settins

Change-Id: I7dae0caa9667f989c466a6091f4e97c9c03fcc1e
diff --git a/src/com/android/camera/SettingsManager.java b/src/com/android/camera/SettingsManager.java
index dd7211d..a8ac6c1 100755
--- a/src/com/android/camera/SettingsManager.java
+++ b/src/com/android/camera/SettingsManager.java
@@ -331,6 +331,17 @@
         mDependency = parseJson("dependency.json");
     }
 
+    public void reloadCharacteristics(int cameraId){
+        CameraManager manager = (CameraManager) mContext.getSystemService(Context.CAMERA_SERVICE);
+        try {
+            CameraCharacteristics characteristics
+                    = manager.getCameraCharacteristics(String.valueOf(cameraId));
+            mCharacteristics.set(cameraId, characteristics);
+        } catch (CameraAccessException e) {
+            e.printStackTrace();
+        }
+    }
+
     public static SettingsManager createInstance(Context context) {
         if (sInstance == null) {
             sInstance = new SettingsManager(context.getApplicationContext());
@@ -401,6 +412,7 @@
         final int cameraId = getInitialCameraId(mPreferences);
         setLocalIdAndInitialize(cameraId);
         autoTestBroadcast(cameraId);
+        reloadCharacteristics(cameraId);
     }
 
     public void reinit(int cameraId) {