if (!CameraSettings.EXPOSURE_DEFAULT_VALUE.equals(value)) {
Editor editor = mPreferences.edit();
editor.putString(CameraSettings.KEY_EXPOSURE, "0");
- editor.commit();
+ editor.apply();
if (mHeadUpDisplay != null) {
mHeadUpDisplay.reloadPreferences();
}
SharedPreferences.Editor editor = ComboPreferences
.get(context).edit();
editor.putString(KEY_PICTURE_SIZE, candidate);
- editor.commit();
+ editor.apply();
return;
}
}
if (version == CURRENT_LOCAL_VERSION) return;
SharedPreferences.Editor editor = pref.edit();
editor.putInt(KEY_LOCAL_VERSION, CURRENT_LOCAL_VERSION);
- editor.commit();
+ editor.apply();
}
public static void upgradeGlobalPreferences(SharedPreferences pref) {
editor.remove("pref_camera_video_duration_key");
}
editor.putInt(KEY_VERSION, CURRENT_VERSION);
- editor.commit();
+ editor.apply();
}
public static void upgradeAllPreferences(ComboPreferences pref) {
int cameraId) {
Editor editor = pref.edit();
editor.putInt(KEY_CAMERA_ID, cameraId);
- editor.commit();
+ editor.apply();
}
}
Context context = getGLRootView().getContext();
Editor editor = mSharedPrefs.edit();
editor.clear();
- editor.commit();
+ editor.apply();
CameraSettings.upgradeAllPreferences(mSharedPrefs);
CameraSettings.initialCameraPictureSize(context, param);
reloadPreferences();