[FIX] Android crashing on receive a notification (#2415)
This commit is contained in:
parent
0c55d15378
commit
a07b4cf81d
|
@ -67,15 +67,17 @@ public class Ejson {
|
|||
}
|
||||
|
||||
public String token() {
|
||||
if (mmkv != null) {
|
||||
return mmkv.decodeString(TOKEN_KEY.concat(userId()));
|
||||
String userId = userId();
|
||||
if (mmkv != null && userId != null) {
|
||||
return mmkv.decodeString(TOKEN_KEY.concat(userId));
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public String userId() {
|
||||
if (mmkv != null) {
|
||||
return mmkv.decodeString(TOKEN_KEY.concat(serverURL()));
|
||||
String serverURL = serverURL();
|
||||
if (mmkv != null && serverURL != null) {
|
||||
return mmkv.decodeString(TOKEN_KEY.concat(serverURL));
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue