-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
private static void checkToken() {
//default value
int type = -1;
String token = null;
if (OS == Constants.OS_HUAWEI) {
if (!TextUtils.isEmpty(tokenHuawei)) {
if (ERROR.equals(tokenHuawei)) {
// other
type = Constants.OS_OTHER;
token = tokenOther;
} else if (!TextUtils.isEmpty(tokenOther)) {
// hauwei
type = Constants.OS_HUAWEI;
token = tokenHuawei;
}
}
} else if (OS == Constants.OS_MI) {
if (!TextUtils.isEmpty(tokenMi)) {
if (ERROR.equals(tokenMi)) {
// other
type = Constants.OS_OTHER;
token = tokenOther;
} else if (!TextUtils.isEmpty(tokenOther)) {
// MI
type = Constants.OS_MI;
token = tokenMi;
}
}
} else {
if (!TextUtils.isEmpty(tokenOther)) {
// other
type = Constants.OS_OTHER;
token = tokenOther;
}
}
if ( tokenListeners.size() > 0 && !TextUtils.isEmpty(token) && !ERROR.equals(token)) {
// reportTime--;
for (TokenListener listener : tokenListeners) {
listener.gotToken(type, token);
}
}
}
貌似TextUtils.isEmpty(tokenOther)应该改成TextUtils.isEmpty(tokenMi)和TextUtils.isEmpty(tokenHuawei)
Metadata
Metadata
Assignees
Labels
No labels