OSDN Git Service

Merge "Enable seamless switching to/from camera2-backed Photo module" into ub-camera...
authorSol Boucher <solb@google.com>
Sat, 16 Aug 2014 00:23:35 +0000 (00:23 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Fri, 15 Aug 2014 21:23:40 +0000 (21:23 +0000)
1  2 
src/com/android/camera/CameraActivity.java
src/com/android/camera/settings/CameraSettingsActivity.java

@@@ -104,13 -98,11 +104,15 @@@ public class CameraSettingsActivity ext
              super.onCreate(savedInstanceState);
              Context context = this.getActivity().getApplicationContext();
              addPreferencesFromResource(R.xml.camera_preferences);
 -            CameraSettingsActivityHelper.addAdditionalPreferences(this, context);
 +            // Only add the additional preferences when in the main settings
 +            // view, and not in the sub-preferences screens.
 +            if (mPrefKey == null) {
 +                CameraSettingsActivityHelper.addAdditionalPreferences(this, context);
 +            }
              mCamcorderProfileNames = getResources().getStringArray(R.array.camcorder_profile_names);
-             mInfos = CameraAgentFactory.getAndroidCameraAgent(context).getCameraDeviceInfo();
+             mInfos = CameraAgentFactory
+                     .getAndroidCameraAgent(context, CameraAgentFactory.CameraApi.API_1)
+                     .getCameraDeviceInfo();
          }
  
          @Override