From dfa565dc044942303970d34aef15ef65ca18d93b Mon Sep 17 00:00:00 2001 From: Ryan Morales Date: Thu, 26 Sep 2024 15:14:19 -0700 Subject: [PATCH 1/2] remove cancellation of coroutine children the coroutine children cancellation was causing all other coroutines other than the first to be cancelled early. this led to some race condition like behavior when determining if a presentable conflict had occurred. removing the children cancellation should have no effect on the event handling done in the `DefaultInAppMessageEventHandler`. --- .../services/ui/message/DefaultInAppMessageEventHandler.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/code/core/src/phone/java/com/adobe/marketing/mobile/services/ui/message/DefaultInAppMessageEventHandler.kt b/code/core/src/phone/java/com/adobe/marketing/mobile/services/ui/message/DefaultInAppMessageEventHandler.kt index 44c051a99..6aa883504 100644 --- a/code/core/src/phone/java/com/adobe/marketing/mobile/services/ui/message/DefaultInAppMessageEventHandler.kt +++ b/code/core/src/phone/java/com/adobe/marketing/mobile/services/ui/message/DefaultInAppMessageEventHandler.kt @@ -119,7 +119,6 @@ internal class DefaultInAppMessageEventHandler internal constructor( @MainThread internal fun onNewWebView(webView: WebView?) { Log.debug(ServiceConstants.LOG_TAG, LOG_SOURCE, "Internal web view was reset.") - mainScope.coroutineContext.cancelChildren() webView?.let { this@DefaultInAppMessageEventHandler.webView = WeakReference(it) From 2f148fc8db02728f9bb8474dd7cd65d11d1cc53a Mon Sep 17 00:00:00 2001 From: Ryan Morales Date: Thu, 26 Sep 2024 17:56:09 -0700 Subject: [PATCH 2/2] remove unused import --- .../services/ui/message/DefaultInAppMessageEventHandler.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/code/core/src/phone/java/com/adobe/marketing/mobile/services/ui/message/DefaultInAppMessageEventHandler.kt b/code/core/src/phone/java/com/adobe/marketing/mobile/services/ui/message/DefaultInAppMessageEventHandler.kt index 6aa883504..b25c123d2 100644 --- a/code/core/src/phone/java/com/adobe/marketing/mobile/services/ui/message/DefaultInAppMessageEventHandler.kt +++ b/code/core/src/phone/java/com/adobe/marketing/mobile/services/ui/message/DefaultInAppMessageEventHandler.kt @@ -19,7 +19,6 @@ import com.adobe.marketing.mobile.AdobeCallback import com.adobe.marketing.mobile.services.Log import com.adobe.marketing.mobile.services.ServiceConstants import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.cancelChildren import kotlinx.coroutines.launch import java.io.UnsupportedEncodingException import java.lang.ref.WeakReference