Java 类com.facebook.TokenCachingStrategy 实例源码

项目:yelo-android    文件:Facebook.java   
private TokenCachingStrategy getTokenCache() {
    // Intentionally not volatile/synchronized--it is okay if we race to
    // create more than one of these.
    if (tokenCache == null) {
        tokenCache = new SetterTokenCachingStrategy();
    }
    return tokenCache;
}
项目:yelo-android    文件:Facebook.java   
@Override
public Bundle load() {
    Bundle bundle = new Bundle();

    if (accessToken != null) {
        TokenCachingStrategy.putToken(bundle, accessToken);
        TokenCachingStrategy.putExpirationMilliseconds(bundle, accessExpiresMillisecondsAfterEpoch);
        TokenCachingStrategy.putPermissions(bundle, stringList(pendingAuthorizationPermissions));
        TokenCachingStrategy.putSource(bundle, AccessTokenSource.WEB_VIEW);
        TokenCachingStrategy.putLastRefreshMilliseconds(bundle, lastAccessUpdateMillisecondsAfterEpoch);
    }

    return bundle;
}
项目:yelo-android    文件:Facebook.java   
@Override
public void save(Bundle bundle) {
    accessToken = TokenCachingStrategy.getToken(bundle);
    accessExpiresMillisecondsAfterEpoch = TokenCachingStrategy.getExpirationMilliseconds(bundle);
    pendingAuthorizationPermissions = stringArray(TokenCachingStrategy.getPermissions(bundle));
    lastAccessUpdateMillisecondsAfterEpoch = TokenCachingStrategy.getLastRefreshMilliseconds(bundle);
}
项目:QuizUpWinner    文件:Facebook.java   
public Bundle load()
{
  Bundle localBundle = new Bundle();
  if (Facebook.this.accessToken != null)
  {
    TokenCachingStrategy.putToken(localBundle, Facebook.this.accessToken);
    TokenCachingStrategy.putExpirationMilliseconds(localBundle, Facebook.this.accessExpiresMillisecondsAfterEpoch);
    TokenCachingStrategy.putPermissions(localBundle, Facebook.stringList(Facebook.this.pendingAuthorizationPermissions));
    TokenCachingStrategy.putSource(localBundle, AccessTokenSource.WEB_VIEW);
    TokenCachingStrategy.putLastRefreshMilliseconds(localBundle, Facebook.this.lastAccessUpdateMillisecondsAfterEpoch);
  }
  return localBundle;
}
项目:QuizUpWinner    文件:Facebook.java   
public void save(Bundle paramBundle)
{
  Facebook.access$102(Facebook.this, TokenCachingStrategy.getToken(paramBundle));
  Facebook.access$402(Facebook.this, TokenCachingStrategy.getExpirationMilliseconds(paramBundle));
  Facebook.access$502(Facebook.this, Facebook.stringArray(TokenCachingStrategy.getPermissions(paramBundle)));
  Facebook.access$702(Facebook.this, TokenCachingStrategy.getLastRefreshMilliseconds(paramBundle));
}
项目:p2psafety    文件:Facebook.java   
private TokenCachingStrategy getTokenCache() {
    // Intentionally not volatile/synchronized--it is okay if we race to
    // create more than one of these.
    if (tokenCache == null) {
        tokenCache = new SetterTokenCachingStrategy();
    }
    return tokenCache;
}
项目:p2psafety    文件:Facebook.java   
@Override
public Bundle load() {
    Bundle bundle = new Bundle();

    if (accessToken != null) {
        TokenCachingStrategy.putToken(bundle, accessToken);
        TokenCachingStrategy.putExpirationMilliseconds(bundle, accessExpiresMillisecondsAfterEpoch);
        TokenCachingStrategy.putPermissions(bundle, stringList(pendingAuthorizationPermissions));
        TokenCachingStrategy.putSource(bundle, AccessTokenSource.WEB_VIEW);
        TokenCachingStrategy.putLastRefreshMilliseconds(bundle, lastAccessUpdateMillisecondsAfterEpoch);
    }

    return bundle;
}
项目:p2psafety    文件:Facebook.java   
@Override
public void save(Bundle bundle) {
    accessToken = TokenCachingStrategy.getToken(bundle);
    accessExpiresMillisecondsAfterEpoch = TokenCachingStrategy.getExpirationMilliseconds(bundle);
    pendingAuthorizationPermissions = stringArray(TokenCachingStrategy.getPermissions(bundle));
    lastAccessUpdateMillisecondsAfterEpoch = TokenCachingStrategy.getLastRefreshMilliseconds(bundle);
}
项目:QuizUpWinner    文件:Facebook.java   
private TokenCachingStrategy getTokenCache()
{
  if (this.tokenCache == null)
    this.tokenCache = new SetterTokenCachingStrategy(null);
  return this.tokenCache;
}