Example #1
0
File: K9.java Project: kamilk/k-9
  public static void save(SharedPreferences.Editor editor) {
    editor.putBoolean("enableDebugLogging", K9.DEBUG);
    editor.putBoolean("enableSensitiveLogging", K9.DEBUG_SENSITIVE);
    editor.putString("backgroundOperations", K9.backgroundOps.toString());
    editor.putBoolean("animations", mAnimations);
    editor.putBoolean("gesturesEnabled", mGesturesEnabled);
    editor.putBoolean("useVolumeKeysForNavigation", mUseVolumeKeysForNavigation);
    editor.putBoolean("useVolumeKeysForListNavigation", mUseVolumeKeysForListNavigation);
    editor.putBoolean("manageBack", mManageBack);
    editor.putBoolean("zoomControlsEnabled", mZoomControlsEnabled);
    editor.putBoolean("mobileOptimizedLayout", mMobileOptimizedLayout);
    editor.putBoolean("quietTimeEnabled", mQuietTimeEnabled);
    editor.putString("quietTimeStarts", mQuietTimeStarts);
    editor.putString("quietTimeEnds", mQuietTimeEnds);

    editor.putBoolean("startIntegratedInbox", mStartIntegratedInbox);
    editor.putBoolean("measureAccounts", mMeasureAccounts);
    editor.putBoolean("countSearchMessages", mCountSearchMessages);
    editor.putBoolean("hideSpecialAccounts", mHideSpecialAccounts);
    editor.putBoolean("messageListStars", mMessageListStars);
    editor.putBoolean("messageListCheckboxes", mMessageListCheckboxes);
    editor.putBoolean("messageListTouchable", mMessageListTouchable);
    editor.putInt("messageListPreviewLines", mMessageListPreviewLines);

    editor.putBoolean("showCorrespondentNames", mShowCorrespondentNames);
    editor.putBoolean("showContactName", mShowContactName);
    editor.putBoolean("changeRegisteredNameColor", mChangeContactNameColor);
    editor.putInt("registeredNameColor", mContactNameColor);
    editor.putBoolean("messageViewFixedWidthFont", mMessageViewFixedWidthFont);
    editor.putBoolean("messageViewReturnToList", mMessageViewReturnToList);

    editor.putString("language", language);
    editor.putInt("theme", theme);
    editor.putBoolean("useGalleryBugWorkaround", useGalleryBugWorkaround);

    editor.putBoolean("confirmDelete", mConfirmDelete);

    editor.putBoolean("keyguardPrivacy", mKeyguardPrivacy);

    editor.putBoolean("compactLayouts", compactLayouts);

    fontSizes.save(editor);
  }
Example #2
0
File: K9.java Project: klonikar/k-9
  /**
   * Save settings from our statics into the app database.
   *
   * <p>If you're adding a preference here, odds are you'll need to add it to {@link
   * com.fsck.k9.preferences.GlobalSettings}, too.
   *
   * @param editor Preferences to save into
   */
  public static void save(SharedPreferences.Editor editor) {
    editor.putBoolean("enableDebugLogging", K9.DEBUG);
    editor.putBoolean("enableSensitiveLogging", K9.DEBUG_SENSITIVE);
    editor.putString("backgroundOperations", K9.backgroundOps.name());
    editor.putBoolean("animations", mAnimations);
    editor.putBoolean("gesturesEnabled", mGesturesEnabled);
    editor.putBoolean("useVolumeKeysForNavigation", mUseVolumeKeysForNavigation);
    editor.putBoolean("useVolumeKeysForListNavigation", mUseVolumeKeysForListNavigation);
    editor.putBoolean("autofitWidth", mAutofitWidth);
    editor.putBoolean("quietTimeEnabled", mQuietTimeEnabled);
    editor.putString("quietTimeStarts", mQuietTimeStarts);
    editor.putString("quietTimeEnds", mQuietTimeEnds);

    editor.putBoolean("startIntegratedInbox", mStartIntegratedInbox);
    editor.putBoolean("measureAccounts", mMeasureAccounts);
    editor.putBoolean("countSearchMessages", mCountSearchMessages);
    editor.putBoolean("messageListSenderAboveSubject", mMessageListSenderAboveSubject);
    editor.putBoolean("hideSpecialAccounts", mHideSpecialAccounts);
    editor.putBoolean("messageListStars", mMessageListStars);
    editor.putInt("messageListPreviewLines", mMessageListPreviewLines);
    editor.putBoolean("messageListCheckboxes", mMessageListCheckboxes);
    editor.putBoolean("showCorrespondentNames", mShowCorrespondentNames);
    editor.putBoolean("showContactName", mShowContactName);
    editor.putBoolean("showContactPicture", sShowContactPicture);
    editor.putBoolean("changeRegisteredNameColor", mChangeContactNameColor);
    editor.putInt("registeredNameColor", mContactNameColor);
    editor.putBoolean("messageViewFixedWidthFont", mMessageViewFixedWidthFont);
    editor.putBoolean("messageViewReturnToList", mMessageViewReturnToList);
    editor.putBoolean("messageViewShowNext", mMessageViewShowNext);
    editor.putBoolean("wrapFolderNames", mWrapFolderNames);
    editor.putBoolean("hideUserAgent", mHideUserAgent);
    editor.putBoolean("hideTimeZone", mHideTimeZone);

    editor.putString("language", language);
    editor.putInt("theme", theme.ordinal());
    editor.putInt("messageViewTheme", messageViewTheme.ordinal());
    editor.putInt("messageComposeTheme", composerTheme.ordinal());
    editor.putBoolean("fixedMessageViewTheme", useFixedMessageTheme);

    editor.putBoolean("confirmDelete", mConfirmDelete);
    editor.putBoolean("confirmDeleteStarred", mConfirmDeleteStarred);
    editor.putBoolean("confirmSpam", mConfirmSpam);
    editor.putBoolean("confirmDeleteFromNotification", mConfirmDeleteFromNotification);

    editor.putString("sortTypeEnum", mSortType.name());
    editor.putBoolean("sortAscending", mSortAscending.get(mSortType));

    editor.putString("notificationHideSubject", sNotificationHideSubject.toString());
    editor.putString("notificationQuickDelete", sNotificationQuickDelete.toString());
    editor.putString(
        "lockScreenNotificationVisibility", sLockScreenNotificationVisibility.toString());

    editor.putString("attachmentdefaultpath", mAttachmentDefaultPath);
    editor.putBoolean("useBackgroundAsUnreadIndicator", sUseBackgroundAsUnreadIndicator);
    editor.putBoolean("threadedView", sThreadedViewEnabled);
    editor.putString("splitViewMode", sSplitViewMode.name());
    editor.putBoolean("colorizeMissingContactPictures", sColorizeMissingContactPictures);

    editor.putBoolean("messageViewArchiveActionVisible", sMessageViewArchiveActionVisible);
    editor.putBoolean("messageViewDeleteActionVisible", sMessageViewDeleteActionVisible);
    editor.putBoolean("messageViewMoveActionVisible", sMessageViewMoveActionVisible);
    editor.putBoolean("messageViewCopyActionVisible", sMessageViewCopyActionVisible);
    editor.putBoolean("messageViewSpamActionVisible", sMessageViewSpamActionVisible);

    fontSizes.save(editor);
  }