ClientCredentials.CLIENT_SECRET,
code,
ClientCredentials.REDIRECT_URI).execute();
- PersistentStore credentialStore =
- new PersistentStore(prefs);
- credentialStore.write(accessTokenResponse);
+ PersistentStore store = new PersistentStore(prefs);
+ store.writeTokens(accessTokenResponse);
finish();
} else if (url.indexOf("error=")!=-1) {
- new PersistentStore(prefs).clear();
+ new PersistentStore(prefs).clearTokens();
finish();
}
} catch (IOException e) {