Search in sources :

Example 16 with StorageEditor

use of com.fsck.k9.preferences.StorageEditor in project k-9 by k9mail.

the class MailService method saveLastCheckEnd.

public static void saveLastCheckEnd(Context context) {
    long lastCheckEnd = System.currentTimeMillis();
    Timber.i("Saving lastCheckEnd = %tc", lastCheckEnd);
    Preferences prefs = Preferences.getPreferences(context);
    Storage storage = prefs.getStorage();
    StorageEditor editor = storage.edit();
    editor.putLong(LAST_CHECK_END, lastCheckEnd);
    editor.commit();
}
Also used : Storage(com.fsck.k9.preferences.Storage) Preferences(com.fsck.k9.Preferences) StorageEditor(com.fsck.k9.preferences.StorageEditor)

Aggregations

StorageEditor (com.fsck.k9.preferences.StorageEditor)14 Preferences (com.fsck.k9.Preferences)6 Storage (com.fsck.k9.preferences.Storage)6 Account (com.fsck.k9.Account)4 Intent (android.content.Intent)2 SharedPreferences (android.content.SharedPreferences)2 NetworkType (com.fsck.k9.mail.NetworkType)2 InvalidSettingValueException (com.fsck.k9.preferences.Settings.InvalidSettingValueException)2 ArrayList (java.util.ArrayList)2 Context (android.content.Context)1 Toast (android.widget.Toast)1 BACKGROUND_OPS (com.fsck.k9.K9.BACKGROUND_OPS)1 Folder (com.fsck.k9.mail.Folder)1 ServerSettings (com.fsck.k9.mail.ServerSettings)1 LocalFolder (com.fsck.k9.mailstore.LocalFolder)1 LocalStore (com.fsck.k9.mailstore.LocalStore)1 IOException (java.io.IOException)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 XmlPullParserException (org.xmlpull.v1.XmlPullParserException)1