@@ -28,7 +28,6 @@ public class ModuleContent extends ModuleBase {
2828 private final ContentCallback globalContentCallback ;
2929 private int waitForDelay = 0 ;
3030 int CONTENT_START_DELAY_MS = 4000 ; // 4 seconds
31- int REFRESH_CONTENT_ZONE_DELAY_MS = 2500 ; // 2.5 seconds
3231
3332 ModuleContent (@ NonNull Countly cly , @ NonNull CountlyConfig config ) {
3433 super (cly , config );
@@ -68,8 +67,8 @@ void onActivityStarted(Activity activity, int updatedActivityCount) {
6867 UtilsDevice .getCutout (activity );
6968 }
7069 if (isCurrentlyInContentZone
71- && activity != null
72- && !(activity instanceof TransparentActivity )) {
70+ && activity != null
71+ && !(activity instanceof TransparentActivity )) {
7372 try {
7473 Intent bringToFront = new Intent (activity , TransparentActivity .class );
7574 bringToFront .addFlags (Intent .FLAG_ACTIVITY_REORDER_TO_FRONT );
@@ -404,8 +403,12 @@ void refreshContentZoneInternal(boolean callRQFlush) {
404403 }
405404
406405 if (callRQFlush ) {
406+ requestQueueProvider .registerInternalGlobalRequestCallbackAction (new Runnable () {
407+ @ Override public void run () {
408+ enterContentZoneInternal (null , 0 , null );
409+ }
410+ });
407411 _cly .moduleRequestQueue .attemptToSendStoredRequestsInternal ();
408- enterContentZoneInternal (null , REFRESH_CONTENT_ZONE_DELAY_MS , null );
409412 } else {
410413 enterContentZoneWithRetriesInternal ();
411414 }
@@ -455,4 +458,4 @@ public void refreshContentZone() {
455458 refreshContentZoneInternal (true );
456459 }
457460 }
458- }
461+ }
0 commit comments