/** * Loads the last known database version of the accounts' databases from a {@link * SharedPreference}. * * <p>If the stored version matches {@link LocalStore#DB_VERSION} we know that the databases are * up to date.<br> * Using {@code SharedPreferences} should be a lot faster than opening all SQLite databases to get * the current database version. * * <p>See {@link UpgradeDatabases} for a detailed explanation of the database upgrade process. * * @see #areDatabasesUpToDate() */ public void checkCachedDatabaseVersion() { sDatabaseVersionCache = getSharedPreferences(DATABASE_VERSION_CACHE, MODE_PRIVATE); int cachedVersion = sDatabaseVersionCache.getInt(KEY_LAST_ACCOUNT_DATABASE_VERSION, 0); if (cachedVersion >= LocalStore.DB_VERSION) { K9.setDatabasesUpToDate(false); } }