private String getCustomAuthToken(int userId, Account account, String authTokenType, String packageName) { AuthTokenRecord record = new AuthTokenRecord(userId, account, authTokenType, packageName); String authToken = null; long now = System.currentTimeMillis(); synchronized (authTokenRecords) { Iterator<AuthTokenRecord> iterator = authTokenRecords.iterator(); while (iterator.hasNext()) { AuthTokenRecord one = iterator.next(); if (one.expiryEpochMillis > 0 && one.expiryEpochMillis < now) { iterator.remove(); } else if (record.equals(one)) { authToken = record.authToken; } } } return authToken; }
if (customTokens && expiryMillis > System.currentTimeMillis()) { AuthTokenRecord record = new AuthTokenRecord(userId, account, authTokenType, callerPkg, authToken, expiryMillis); synchronized (authTokenRecords) { authTokenRecords.remove(record);
if (customTokens && expiryMillis > System.currentTimeMillis()) { AuthTokenRecord record = new AuthTokenRecord(userId, account, authTokenType, callerPkg, authToken, expiryMillis); synchronized (authTokenRecords) { authTokenRecords.remove(record);
if (customTokens && expiryMillis > System.currentTimeMillis()) { AuthTokenRecord record = new AuthTokenRecord(userId, account, authTokenType, callerPkg, authToken, expiryMillis); synchronized (authTokenRecords) { authTokenRecords.remove(record);
if (customTokens && expiryMillis > System.currentTimeMillis()) { AuthTokenRecord record = new AuthTokenRecord(userId, account, authTokenType, callerPkg, authToken, expiryMillis); synchronized (authTokenRecords) { authTokenRecords.remove(record);
if (customTokens && expiryMillis > System.currentTimeMillis()) { AuthTokenRecord record = new AuthTokenRecord(userId, account, authTokenType, callerPkg, authToken, expiryMillis); synchronized (authTokenRecords) { authTokenRecords.remove(record);
if (customTokens && expiryMillis > System.currentTimeMillis()) { AuthTokenRecord record = new AuthTokenRecord(userId, account, authTokenType, callerPkg, authToken, expiryMillis); synchronized (authTokenRecords) { authTokenRecords.remove(record);
private String getCustomAuthToken(int userId, Account account, String authTokenType, String packageName) { AuthTokenRecord record = new AuthTokenRecord(userId, account, authTokenType, packageName); String authToken = null; long now = System.currentTimeMillis(); synchronized (authTokenRecords) { Iterator<AuthTokenRecord> iterator = authTokenRecords.iterator(); while (iterator.hasNext()) { AuthTokenRecord one = iterator.next(); if (one.expiryEpochMillis > 0 && one.expiryEpochMillis < now) { iterator.remove(); } else if (record.equals(one)) { authToken = record.authToken; } } } return authToken; }
private String getCustomAuthToken(int userId, Account account, String authTokenType, String packageName) { AuthTokenRecord record = new AuthTokenRecord(userId, account, authTokenType, packageName); String authToken = null; long now = System.currentTimeMillis(); synchronized (authTokenRecords) { Iterator<AuthTokenRecord> iterator = authTokenRecords.iterator(); while (iterator.hasNext()) { AuthTokenRecord one = iterator.next(); if (one.expiryEpochMillis > 0 && one.expiryEpochMillis < now) { iterator.remove(); } else if (record.equals(one)) { authToken = record.authToken; } } } return authToken; }