Skip to content

Commit a473157

Browse files
authored
feat: Always set the wrapperSdkVersion in KitManager (#584)
Always set the wrapperSdkVersion in KitManager
1 parent d40a90e commit a473157

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

android-core/src/main/java/com/mparticle/MParticle.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,12 +385,14 @@ public WrapperSdkVersion getWrapperSdkVersion() {
385385
* @param version
386386
*/
387387
public void setWrapperSdk(@NotNull WrapperSdk wrapperSdk, @NotNull String version) {
388+
// Set instance wrapperSdkVersion if it is not set or if the wrapperSdk is different from the current one
388389
if (this.wrapperSdkVersion.getSdk() == WrapperSdk.WrapperNone && (wrapperSdk != WrapperSdk.WrapperNone && !version.isEmpty())) {
389390
this.wrapperSdkVersion = new WrapperSdkVersion(wrapperSdk, version);
390391
}
391392

392393
if (mConfigManager.isEnabled()) {
393-
mKitManager.setWrapperSdkVersion(wrapperSdkVersion);
394+
// Regardless of instance wrapperSdkVersion, set the wrapperSdkVersion in KitManager
395+
mKitManager.setWrapperSdkVersion(new WrapperSdkVersion(wrapperSdk, version));
394396
}
395397
}
396398

0 commit comments

Comments
 (0)