File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
iterableapi/src/main/java/com/iterable/iterableapi Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -392,11 +392,10 @@ public void onSwitchToBackground() {}
392392 private void onForeground () {
393393 if (!_firstForegroundHandled ) {
394394 _firstForegroundHandled = true ;
395- fetchRemoteConfiguration ();
396-
397395 if (sharedInstance .config .autoPushRegistration && sharedInstance .isInitialized ()) {
398396 sharedInstance .registerForPush ();
399397 }
398+ fetchRemoteConfiguration ();
400399 }
401400
402401 boolean systemNotificationEnabled = NotificationManagerCompat .from (_applicationContext ).areNotificationsEnabled ();
@@ -407,11 +406,11 @@ private void onForeground() {
407406 if (!systemNotificationEnabled ) {
408407 sharedInstance .disablePush ();
409408 }
410- }
411409
412- SharedPreferences .Editor editor = sharedPref .edit ();
413- editor .putBoolean (IterableConstants .SHARED_PREFS_DEVICE_NOTIFICATIONS_ENABLED , systemNotificationEnabled );
414- editor .apply ();
410+ SharedPreferences .Editor editor = sharedPref .edit ();
411+ editor .putBoolean (IterableConstants .SHARED_PREFS_DEVICE_NOTIFICATIONS_ENABLED , systemNotificationEnabled );
412+ editor .apply ();
413+ }
415414 }
416415
417416 private boolean isInitialized () {
You can’t perform that action at this time.
0 commit comments