core-android/src/main/java/com/uber/sdk/android/core/auth/AccessTokenManager.java
@Override
    @Nullable
    public AccessToken getAccessToken() {

        long expiresIn;
        String token;
        Set<String> scopesString;
        String refreshToken;
        String tokenType;

        try {
            expiresIn = sharedPreferences.getLong(accessTokenKey + DATE_KEY_SUFFIX, -1);
            token = sharedPreferences.getString(accessTokenKey + TOKEN_KEY_SUFFIX, null);
            scopesString = sharedPreferences.getStringSet(accessTokenKey + SCOPES_KEY_SUFFIX, null);
            refreshToken = sharedPreferences.getString(accessTokenKey + REFRESH_TOKEN_KEY_SUFFIX, null);
            tokenType = sharedPreferences.getString(accessTokenKey + TOKEN_TYPE_KEY_SUFFIX, null);
        } catch (ClassCastException ignored) {
            return null;
        }

        if (expiresIn == -1 || token == null || scopesString == null) {
            // Return null, if we can't parse it this token is considered unsaved.
            return null;
        }

        Collection<Scope> scopes;
        try {
            scopes = AuthUtils.stringCollectionToScopeCollection(scopesString);
        } catch (IllegalArgumentException ignored) {
            return null;
        }

        return new AccessToken(expiresIn, scopes, token, refreshToken, tokenType);
    }
@Override
    @Nullable
    public AccessToken getAccessToken() {

        long expiresIn;
        String token;
        Set<String> scopesString;
        String refreshToken;
        String tokenType;

        try {
            expiresIn = sharedPreferences.getLong(accessTokenKey + DATE_KEY_SUFFIX, -1);
            token = sharedPreferences.getString(accessTokenKey + TOKEN_KEY_SUFFIX, null);
            scopesString = sharedPreferences.getStringSet(accessTokenKey + SCOPES_KEY_SUFFIX, null);
            refreshToken = sharedPreferences.getString(accessTokenKey + REFRESH_TOKEN_KEY_SUFFIX, null);
            tokenType = sharedPreferences.getString(accessTokenKey + TOKEN_TYPE_KEY_SUFFIX, null);
        } catch (ClassCastException ignored) {
            return null;
        }

        if (expiresIn == -1 || token == null || scopesString == null) {
            // Return null, if we can't parse it this token is considered unsaved.
            return null;
        }

        Collection<Scope> scopes;
        try {
            scopes = AuthUtils.stringCollectionToScopeCollection(scopesString);
        } catch (IllegalArgumentException ignored) {
            return null;
        }

        return new AccessToken(expiresIn, scopes, token, refreshToken, tokenType);
    }
Gets an {@link AccessToken} stored.