Home | History | Annotate | Download | only in camera

Lines Matching defs:pref

305             ListPreference pref, List<String> supported) {
310 removePreference(group, pref.getKey());
314 pref.filterUnsupported(supported);
315 if (pref.getEntries().length <= 1) {
316 removePreference(group, pref.getKey());
320 resetIfInvalid(pref);
324 ListPreference pref) {
325 pref.filterDuplicated();
326 if (pref.getEntries().length <= 1) {
327 removePreference(group, pref.getKey());
330 resetIfInvalid(pref);
333 private void resetIfInvalid(ListPreference pref) {
335 String value = pref.getValue();
336 if (pref.findIndexOfValue(value) == NOT_FOUND) {
337 pref.setValueIndex(0);
349 public static void upgradeLocalPreferences(SharedPreferences pref) {
352 version = pref.getInt(KEY_LOCAL_VERSION, 0);
358 SharedPreferences.Editor editor = pref.edit();
368 public static void upgradeGlobalPreferences(SharedPreferences pref) {
369 upgradeOldVersion(pref);
370 upgradeCameraId(pref);
373 private static void upgradeOldVersion(SharedPreferences pref) {
376 version = pref.getInt(KEY_VERSION, 0);
382 SharedPreferences.Editor editor = pref.edit();
390 String quality = pref.getString(KEY_JPEG_QUALITY, "85");
403 pref.getBoolean(KEY_RECORD_LOCATION, false)
419 private static void upgradeCameraId(SharedPreferences pref) {
424 int cameraId = readPreferredCameraId(pref);
429 writePreferredCameraId(pref, 0);
433 public static int readPreferredCameraId(SharedPreferences pref) {
434 return Integer.parseInt(pref.getString(KEY_CAMERA_ID, "0"));
437 public static void writePreferredCameraId(SharedPreferences pref,
439 Editor editor = pref.edit();
456 public static int readEffectType(SharedPreferences pref) {
457 String effectSelection = pref.getString(KEY_VIDEO_EFFECT, "none");
469 public static Object readEffectParameter(SharedPreferences pref) {
470 String effectSelection = pref.getString(KEY_VIDEO_EFFECT, "none");