File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
OneSignalSDK/onesignal/src/main/java/com/onesignal Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -790,7 +790,7 @@ public void run() {
790
790
userState .set ("carrier" , osUtils .getCarrierName ());
791
791
userState .set ("rooted" , RootToolsInternalMethods .isRooted ());
792
792
793
- if (lastLocationPoint != null )
793
+ if (shareLocation && lastLocationPoint != null )
794
794
userState .setLocation (lastLocationPoint );
795
795
796
796
OneSignalStateSynchronizer .postUpdate (userState , sendAsSession );
Original file line number Diff line number Diff line change @@ -226,6 +226,9 @@ static boolean stopAndPersist() {
226
226
}
227
227
228
228
static void clearLocation () {
229
+ if (appContext == null )
230
+ return ;
231
+
229
232
getToSyncUserState ().clearLocation ();
230
233
getToSyncUserState ().persistState ();
231
234
}
You can’t perform that action at this time.
0 commit comments