From a7135be841d64d9b19d346804443b7783dd478e3 Mon Sep 17 00:00:00 2001 From: Ishita Gambhir Date: Fri, 31 Oct 2025 13:11:17 +0530 Subject: [PATCH] invoke completion callback for early return --- .../src/phone/java/com/adobe/marketing/mobile/MobileCore.java | 2 ++ .../java/com/adobe/marketing/mobile/MobileCoreInitializer.kt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/code/core/src/phone/java/com/adobe/marketing/mobile/MobileCore.java b/code/core/src/phone/java/com/adobe/marketing/mobile/MobileCore.java index 4efd0925a..8b44c6831 100644 --- a/code/core/src/phone/java/com/adobe/marketing/mobile/MobileCore.java +++ b/code/core/src/phone/java/com/adobe/marketing/mobile/MobileCore.java @@ -56,11 +56,13 @@ public static void initialize( @Nullable final AdobeCallback completionCallback) { if (application == null) { Log.error(CoreConstants.LOG_TAG, LOG_TAG, "initialize failed - application is null."); + completionCallback.call(null); return; } if (initOptions == null) { Log.error(CoreConstants.LOG_TAG, LOG_TAG, "initialize failed - initOptions is null."); + completionCallback.call(null); return; } diff --git a/code/core/src/phone/java/com/adobe/marketing/mobile/MobileCoreInitializer.kt b/code/core/src/phone/java/com/adobe/marketing/mobile/MobileCoreInitializer.kt index 0b903ea90..443a8d7e8 100644 --- a/code/core/src/phone/java/com/adobe/marketing/mobile/MobileCoreInitializer.kt +++ b/code/core/src/phone/java/com/adobe/marketing/mobile/MobileCoreInitializer.kt @@ -90,6 +90,7 @@ internal class MobileCoreInitializer( completionCallback: AdobeCallback<*>? ) { if (initializeCalled.getAndSet(true)) { + completionCallback?.call(null) Log.debug(CoreConstants.LOG_TAG, LOG_TAG, "initialize failed - ignoring as it was already called.") return } @@ -186,6 +187,7 @@ internal class MobileCoreInitializer( LOG_TAG, "Failed to registerExtensions - setApplication not called" ) + completionCallback?.call(null) return }