diff --git a/plugin/src/android/src/main/java/com/mparticle/cordova/MParticleCordovaPlugin.java b/plugin/src/android/src/main/java/com/mparticle/cordova/MParticleCordovaPlugin.java index d8a33af..15a607f 100644 --- a/plugin/src/android/src/main/java/com/mparticle/cordova/MParticleCordovaPlugin.java +++ b/plugin/src/android/src/main/java/com/mparticle/cordova/MParticleCordovaPlugin.java @@ -359,7 +359,7 @@ public void addGDPRConsentState(final JSONArray args) throws JSONException, Pars String purpose = args.getString(1); if (user != null && map != null && purpose != null) { GDPRConsent newConsent = ConvertGDPRConsent(map); - ConsentState state = ConsentState.builder() + ConsentState state = ConsentState.withConsentState(user.getConsentState()) .addGDPRConsentState(purpose, newConsent) .build(); @@ -384,7 +384,7 @@ public void addCCPAConsentState(final JSONArray args) throws JSONException, Pars final JSONObject map = args.getJSONObject(0); if (user != null && map != null) { CCPAConsent newConsent = ConvertCCPAConsent(map); - ConsentState state = ConsentState.builder() + ConsentState state = ConsentState.withConsentState(user.getConsentState()) .setCCPAConsentState(newConsent) .build();