Skip to content

Commit

Permalink
fix: Android Consent now retains previously Set Consent States (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonStalnaker authored Jan 9, 2023
1 parent cb35d38 commit c5ce970
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand All @@ -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();

Expand Down

0 comments on commit c5ce970

Please sign in to comment.