diff --git a/launchdarkly-android-client-sdk/src/main/java/com/launchdarkly/sdk/android/AutoEnvContextModifier.java b/launchdarkly-android-client-sdk/src/main/java/com/launchdarkly/sdk/android/AutoEnvContextModifier.java index 13cc8816..499f46f5 100644 --- a/launchdarkly-android-client-sdk/src/main/java/com/launchdarkly/sdk/android/AutoEnvContextModifier.java +++ b/launchdarkly-android-client-sdk/src/main/java/com/launchdarkly/sdk/android/AutoEnvContextModifier.java @@ -140,8 +140,7 @@ private List makeRecipeList() { new ContextRecipe( ldApplicationKind, () -> LDUtil.urlSafeBase64Hash( - Objects.toString(environmentReporter.getApplicationInfo().getApplicationId(), "") + ":" - + Objects.toString(environmentReporter.getApplicationInfo().getApplicationVersion(), "") + Objects.toString(environmentReporter.getApplicationInfo().getApplicationId(), "") ), applicationCallables ), diff --git a/launchdarkly-android-client-sdk/src/test/java/com/launchdarkly/sdk/android/AutoEnvContextModifierTest.java b/launchdarkly-android-client-sdk/src/test/java/com/launchdarkly/sdk/android/AutoEnvContextModifierTest.java index aab51c58..642a990e 100644 --- a/launchdarkly-android-client-sdk/src/test/java/com/launchdarkly/sdk/android/AutoEnvContextModifierTest.java +++ b/launchdarkly-android-client-sdk/src/test/java/com/launchdarkly/sdk/android/AutoEnvContextModifierTest.java @@ -40,10 +40,7 @@ public void adheresToSchemaTest() { // it is important that we create this expected context after the code runs because there // will be persistence side effects ContextKind applicationKind = ContextKind.of(AutoEnvContextModifier.LD_APPLICATION_KIND); - String expectedApplicationKey = LDUtil.urlSafeBase64Hash( - reporter.getApplicationInfo().getApplicationId() + ":" - + reporter.getApplicationInfo().getApplicationVersion() - ); + String expectedApplicationKey = LDUtil.urlSafeBase64Hash(reporter.getApplicationInfo().getApplicationId()); LDContext expectedAppContext = LDContext.builder(applicationKind, expectedApplicationKey) .set(AutoEnvContextModifier.ENV_ATTRIBUTES_VERSION, AutoEnvContextModifier.SPEC_VERSION) .set(AutoEnvContextModifier.ATTR_ID, LDPackageConsts.SDK_NAME) @@ -180,7 +177,7 @@ public void generatedApplicationKeyWithVersionMissing() { // it is important that we create this expected context after the code runs because there // will be persistence side effects ContextKind applicationKind = ContextKind.of(AutoEnvContextModifier.LD_APPLICATION_KIND); - String expectedApplicationKey = LDUtil.urlSafeBase64Hash(reporter.getApplicationInfo().getApplicationId() + ":"); + String expectedApplicationKey = LDUtil.urlSafeBase64Hash(reporter.getApplicationInfo().getApplicationId()); LDContext expectedAppContext = LDContext.builder(applicationKind, expectedApplicationKey) .set(AutoEnvContextModifier.ENV_ATTRIBUTES_VERSION, AutoEnvContextModifier.SPEC_VERSION)