public static AccessTokenSource getSource ( Bundle bundle ) { Validate . notNull ( bundle , "bundle" ) ; if ( bundle . containsKey ( TokenCachingStrategy . TOKEN_SOURCE_KEY ) ) { return ( AccessTokenSource ) bundle . getSerializable ( TokenCachingStrategy . TOKEN_SOURCE_KEY ) ; } else { boolean isSSO = bundle . getBoolean ( TokenCachingStrategy . IS_SSO_KEY ) ; return isSSO ? AccessTokenSource . FACEBOOK_APPLICATION_WEB : AccessTokenSource . WEB_VIEW ; } }
Gets the cached enum indicating the source of the token from the Bundle .