File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
OneSignalSDK/onesignal/src/main/java/com/onesignal Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -119,8 +119,10 @@ protected synchronized UserState getToSyncUserState() {
119
119
}
120
120
121
121
void initUserState () {
122
- if (currentUserState == null )
123
- currentUserState = newUserState ("CURRENT_STATE" , true );
122
+ synchronized (syncLock ) {
123
+ if (currentUserState == null )
124
+ currentUserState = newUserState ("CURRENT_STATE" , true );
125
+ }
124
126
125
127
getToSyncUserState ();
126
128
}
@@ -167,6 +169,9 @@ private void internalSyncUserState(boolean fromSyncService) {
167
169
return ;
168
170
}
169
171
172
+ if (currentUserState == null )
173
+ initUserState ();
174
+
170
175
final boolean isSessionCall = isSessionCall ();
171
176
JSONObject jsonBody , dependDiff ;
172
177
synchronized (syncLock ) {
You can’t perform that action at this time.
0 commit comments