From af5d16ac6d02311b8ef1cc8b26bdace43923e386 Mon Sep 17 00:00:00 2001 From: Emilia Dobrin <33132425+emdobrin@users.noreply.github.com> Date: Thu, 8 Apr 2021 11:51:35 -0700 Subject: [PATCH] Fetch identity shared state when needed (#44) --- .../adobe/marketing/mobile/edge/identity/IdentityState.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/edgeidentity/src/main/java/com/adobe/marketing/mobile/edge/identity/IdentityState.java b/code/edgeidentity/src/main/java/com/adobe/marketing/mobile/edge/identity/IdentityState.java index 98f7a31a..e593af22 100644 --- a/code/edgeidentity/src/main/java/com/adobe/marketing/mobile/edge/identity/IdentityState.java +++ b/code/edgeidentity/src/main/java/com/adobe/marketing/mobile/edge/identity/IdentityState.java @@ -75,8 +75,6 @@ boolean bootupIfReady(final SharedStateCallback callback) { // Reuse the ECID from Identity Direct (if registered) or generate new ECID on first launch if (identityProperties.getECID() == null) { - final Map identityDirectSharedState = callback.getSharedState( - IdentityConstants.SharedState.IdentityDirect.NAME, null); // Attempt to get ECID from direct Identity persistence to migrate an existing ECID final ECID directIdentityEcid = IdentityStorageService.loadEcidFromDirectIdentityPersistence(); @@ -89,6 +87,8 @@ boolean bootupIfReady(final SharedStateCallback callback) { // If direct Identity has no persisted ECID, check if direct Identity is registered with the SDK else if (isIdentityDirectRegistered(callback)) { + final Map identityDirectSharedState = callback.getSharedState( + IdentityConstants.SharedState.IdentityDirect.NAME, null); // If the direct Identity extension is registered, attempt to get its shared state if (identityDirectSharedState != null) { // identity direct shared state is set