/** {@inheritDoc} */ @Override public void logout(final AuthCallbacks.LogoutListener logoutListener) { SoomlaUtils.LogDebug(TAG, "logout"); KeyValueStorage.deleteKeyValue(getTwitterStorageKey(TWITTER_OAUTH_TOKEN)); KeyValueStorage.deleteKeyValue(getTwitterStorageKey(TWITTER_OAUTH_SECRET)); mainRequestToken = null; twitter.setOAuthAccessToken(null); twitter.shutdown(); logoutListener.success(); }
private static void clearCurrentState() { List<String> allKeys = KeyValueStorage.getEncryptedKeys(); for (String key : allKeys) { if (key.startsWith(GateStorage.DB_GATE_KEY_PREFIX) || key.startsWith(LevelStorage.DB_LEVEL_KEY_PREFIX) || key.startsWith(MissionStorage.DB_MISSION_KEY_PREFIX) || key.startsWith(ScoreStorage.DB_SCORE_KEY_PREFIX) || key.startsWith(WorldStorage.DB_WORLD_KEY_PREFIX)) { KeyValueStorage.deleteKeyValue(key); } } }