Skip to content

Commit

Permalink
[MOB-10364] Update according to new discussiom
Browse files Browse the repository at this point in the history
  • Loading branch information
sumeruchat committed Jan 10, 2025
1 parent fc9253f commit 06e6c86
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,11 @@ private void onForeground() {
fetchRemoteConfiguration();
}

if (_applicationContext == null || sharedInstance.getMainActivityContext() == null) {
IterableLogger.w(TAG, "onForeground: _applicationContext is null");
return;
}

boolean systemNotificationEnabled = NotificationManagerCompat.from(_applicationContext).areNotificationsEnabled();
SharedPreferences sharedPref = sharedInstance.getMainActivityContext().getSharedPreferences(IterableConstants.SHARED_PREFS_FILE, Context.MODE_PRIVATE);

Expand Down Expand Up @@ -1435,4 +1440,4 @@ public void trackEmbeddedSession(@NonNull IterableEmbeddedSession session) {
apiClient.trackEmbeddedSession(session);
}
//endregion
}
}

0 comments on commit 06e6c86

Please sign in to comment.