Buggy code:
private static final String PREFERENCE_QUOTE_PREFIX = "account_quote_prefix" ; private static final String PREFERENCE_QUOTE_STYLE = "quote_style" ; private static final String PREFERENCE_DEFAULT_QUOTED_TEXT_SHOWN = "default_quoted_text_shown" ; private static final String PREFERENCE_SYNC_REMOTE_DELETIONS = "account_sync_remote_deletions" ; private static final String PREFERENCE_CRYPTO = "crypto" ; private static final String PREFERENCE_CRYPTO_APP = "crypto_app" ; private static final String PREFERENCE_CRYPTO_KEY = "crypto_key" ; private static final String PREFERENCE_REMOTE_SEARCH_ENABLED = "remote_search_enabled" ; private static final String PREFERENCE_REMOTE_SEARCH_NUM_RESULTS = "account_remote_search_num_results" ; private static final String PREFERENCE_REMOTE_SEARCH_FULL_TEXT = "account_remote_search_full_text" ; private static final String PREFERENCE_LOCAL_STORAGE_PROVIDER = "local_storage_provider" ; private static final String PREFERENCE_CATEGORY_FOLDERS = "folders" ; private static final String PREFERENCE_ARCHIVE_FOLDER = "archive_folder" ; private static final String PREFERENCE_DRAFTS_FOLDER = "drafts_folder" ; private static final String PREFERENCE_SENT_FOLDER = "sent_folder" ; private static final String PREFERENCE_SPAM_FOLDER = "spam_folder" ; private static final String PREFERENCE_TRASH_FOLDER = "trash_folder" ; private static final String PREFERENCE_CRYPTO_SMIME_APP = "smime_app" ; private Account mAccount ; private boolean mIsMoveCapable = false ; private boolean mIsPushCapable = false ; private boolean mIsExpungeCapable = false ; private boolean mIsSeenFlagSupported = false ; private PreferenceScreen mMainScreen ; private PreferenceScreen mComposingScreen ; private EditTextPreference mAccountDescription ; private ListPreference incoming_checkFrequency ; private ListPreference incoming_displayCount ; private ListPreference incoming_messageAge ; private ListPreference incoming_messageSize ; private SwitchPreferenceCompat mAccountDefault ; private SwitchPreferenceCompat mAccountNotify ; private ListPreference mAccountNotifyNewMailMode ; private SwitchPreferenceCompat mAccountNotifySelf ; private ListPreference mAccountShowPictures ; private SwitchPreferenceCompat mAccountNotifySync ; private SwitchPreferenceCompat mAccountVibrate ; private SwitchPreferenceCompat mAccountLed ; private ListPreference mAccountVibratePattern ; private ListPreference mAccountVibrateTimes ; private RingtonePreference mAccountRingtone ; private ListPreference folder_displayMode ; private ListPreference incoming_SyncMode ; private ListPreference incoming_pushMode ; private ListPreference folder_targetMode ; private ListPreference incoming_deletePolicy ; private ListPreference incoming_expungePolicy ; private ListPreference folder_searchableFolders ; private ListPreference mAutoExpandFolder ; private Preference mChipColor ; private Preference mLedColor ; private boolean mIncomingChanged = false ; private SwitchPreferenceCompat mNotificationOpensUnread ; private ListPreference composing_messageFormat ; private SwitchPreferenceCompat composing_messageReadReceipt ; private ListPreference composing_quoteStyle ; private EditTextPreference composing_accountQuotePrefix ; private SwitchPreferenceCompat composing_accountDefaultQuotedTextShown ; private SwitchPreferenceCompat incoming_syncRemoteDeletions ; private boolean mHasCrypto = false ; private AppPreference mCryptoApp ; private OpenPgpKeyPreference mCryptoKey ; private PreferenceCategory mSearchScreen ; private SwitchPreferenceCompat mCloudSearchEnabled ; private ListPreference mRemoteSearchNumResults ; private ListPreference mLocalStorageProvider ; private ListPreference mArchiveFolder ; private ListPreference mDraftsFolder ; private ListPreference mSentFolder ; private ListPreference mSpamFolder ; private ListPreference mTrashFolder ; private AppPreference mSmimeApp ; private ListPreference defaultCryptoProvider ; private Context mContext ; public static AccountPreferences newInstance ( Account account ) { } @ Override public SmilePreferenceFragment openPreferenceScreen ( ) { } @ Override public void onCreatePreferences ( Bundle bundle , String s ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } private void setupNotificationScreen ( ) { } private void setupMainScreen ( ) { } private void setupCryptoCategory ( ) { mHasCrypto = OpenPgpUtils . isAvailable ( mContext ) ; if ( mHasCrypto ) { mCryptoApp = ( ( AppPreference ) ( findPreference ( AccountPreferences . PREFERENCE_CRYPTO_APP ) ) ) ; mCryptoApp . setValue ( String . valueOf ( mAccount . getPgpApp ( ) ) ) ; mCryptoApp . setOnPreferenceChangeListener ( new Preference . OnPreferenceChangeListener ( ) { public boolean onPreferenceChange ( Preference preference , Object newValue ) { String value = newValue . toString ( ) ; mCryptoApp . setValue ( value ) ; return false ; } } ) ; } else { final Preference mCryptoApp = findPreference ( AccountPreferences . PREFERENCE_CRYPTO_APP ) ; mCryptoApp . setEnabled ( false ) ; mCryptoApp . setSummary ( account_settings_no_openpgp_provider_installed ) ; } mSmimeApp = ( ( AppPreference ) ( findPreference ( AccountPreferences . PREFERENCE_CRYPTO_SMIME_APP ) ) ) ; <START_BUG> mSmimeApp . setValue ( String . valueOf ( mAccount . getPgpApp ( ) ) ) ; <END_BUG> mSmimeApp . setOnPreferenceChangeListener ( new Preference . OnPreferenceChangeListener ( ) { public boolean onPreferenceChange ( Preference preference , Object newValue ) { String value = newValue . toString ( ) ; mSmimeApp . setValue ( value ) ; return false ; } } ) ; defaultCryptoProvider = ( ( ListPreference ) ( findPreference ( "default_crypto" ) ) ) ; if ( ( defaultCryptoProvider ) != null ) { defaultCryptoProvider . setValue ( mAccount . getDefaultCryptoProvider ( ) ) ; defaultCryptoProvider . setOnPreferenceChangeListener ( new Preference . OnPreferenceChangeListener ( ) { @ Override public boolean onPreferenceChange ( Preference preference , Object newValue ) { String value = newValue . toString ( ) ; defaultCryptoProvider . setValue ( value ) ; return false ; } } ) ; } } private void setupIncomingScreen ( ) { } private void setupComposingScreen ( ) { } private void setupFolderScreen ( ) { } private void setupStorageProviderScreen ( ) { } private boolean isMainScreen ( ) { } private boolean isIncomingScreen ( ) { } private boolean isComposingScreen ( ) { } private boolean isFolderScreen ( ) { } private boolean isStorageProviderScreen ( ) { } private boolean isNotificationScreen ( ) { } private boolean isScreen ( @ StringRes int resId ) { } @ Override public void onPause ( ) { } private void removeListEntry ( ListPreference listPreference , String remove ) { } private void saveSettings ( ) { } private void saveMainScreen ( ) { } private void saveIncomingScreen ( ) { } private void saveComposingScreen ( ) { } private void saveFolderScreen ( ) { } private void saveStorageProviderScreen ( ) { } private void saveNotificationScreen ( ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } private void onCompositionSettings ( ) { } private void onIncomingSettings ( ) { } private void onOutgoingSettings ( ) { } public void onChooseChipColor ( ) { } public void onChooseLedColor ( ) { } public void onChooseAutoExpandFolder ( ) { } private String translateFolder ( String in ) { } private String reverseTranslateFolder ( String in ) { } private void doVibrateTest ( Preference preference ) { } private void updateRemoteSearchLimit ( String maxResults ) { } private class PopulateFolderPrefsTask extends AsyncTask < Void , Void , Void > { List < ? extends Folder > folders = new LinkedList < > ( ) ;

Fix:
mSmimeApp . setValue ( String . valueOf ( mAccount . getSmimeProvider ( ) ) ) ;