public AccountManagerFuture<Bundle> getAuthTokenForeground( Activity paramActivity, Account paramAccount, AccountManagerCallback<Bundle> paramAccountManagerCallback, Handler paramHandler) throws AuthenticatorException { String str = Gservices.getString(this.mContext.getContentResolver(), "music_auth_token", "sj"); AccountManager localAccountManager = AccountManager.get(this.mContext); Bundle localBundle = new Bundle(); Account localAccount = paramAccount; Activity localActivity = paramActivity; AccountManagerCallback<Bundle> localAccountManagerCallback = paramAccountManagerCallback; Handler localHandler = paramHandler; AccountManagerFuture localAccountManagerFuture = localAccountManager.getAuthToken( localAccount, str, localBundle, localActivity, localAccountManagerCallback, localHandler); if (localAccountManagerFuture == null) throw new AuthenticatorException("Received null auth token."); return localAccountManagerFuture; }
public static UrlRules getRules(ContentResolver paramContentResolver) { for (; ; ) { Object localObject2; try { localObject2 = Gservices.getVersionToken(paramContentResolver); if (localObject2 == sCachedVersionToken) { if (Log.isLoggable("UrlRules", 2)) { Log.v("UrlRules", "Using cached rules, versionToken: " + localObject2); } localUrlRules = sCachedRules; return localUrlRules; } if (Log.isLoggable("UrlRules", 2)) { Log.v("UrlRules", "Scanning for Gservices \"url:*\" rules"); } Map localMap = Gservices.getStringsByPrefix(paramContentResolver, new String[] {"url:"}); ArrayList localArrayList = new ArrayList(); Iterator localIterator = localMap.entrySet().iterator(); if (localIterator.hasNext()) { Map.Entry localEntry = (Map.Entry) localIterator.next(); try { String str1 = ((String) localEntry.getKey()).substring(4); String str2 = (String) localEntry.getValue(); if ((str2 == null) || (str2.length() == 0)) { continue; } if (Log.isLoggable("UrlRules", 2)) { Log.v("UrlRules", " Rule " + str1 + ": " + str2); } localArrayList.add(new Rule(str1, str2)); } catch (RuleFormatException localRuleFormatException) { Log.e("UrlRules", "Invalid rule from Gservices", localRuleFormatException); } continue; } sCachedRules = new UrlRules((Rule[]) localArrayList.toArray(new Rule[localArrayList.size()])); } finally { } sCachedVersionToken = localObject2; if (Log.isLoggable("UrlRules", 2)) { Log.v("UrlRules", "New rules stored, versionToken: " + localObject2); } UrlRules localUrlRules = sCachedRules; } }
public void invalidateAuthToken(Account paramAccount, String paramString) { String str1 = Gservices.getString(this.mContext.getContentResolver(), "music_auth_token", "sj"); AccountManager localAccountManager = AccountManager.get(this.mContext); String str2 = paramAccount.type; localAccountManager.invalidateAuthToken(str2, paramString); }
public static String getAuthTokenType(Context paramContext) { return Gservices.getString(paramContext.getContentResolver(), "music_auth_token", "sj"); }