Skip to content

Commit e24c2d8

Browse files
committed
DIA-3629 add GCMDataWrapper to gdpr consent wrapper
1 parent 14b3686 commit e24c2d8

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Assets/ConsentManagementProvider/Scripts/json/JsonUnwrapper.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ public static SpGdprConsent UnwrapSpGdprConsentAndroid(SpGdprConsentWrapperAndro
102102
}
103103
}
104104

105+
unwrapped.googleConsentMode = new SPGCMData(
106+
wrappedGdpr.gcmStatus.ad_storage,
107+
wrappedGdpr.gcmStatus.analytics_storage,
108+
wrappedGdpr.gcmStatus.ad_user_data,
109+
wrappedGdpr.gcmStatus.ad_personalization
110+
);
111+
105112
return new SpGdprConsent(unwrapped);
106113
}
107114

Assets/ConsentManagementProvider/Scripts/json/wrappers/android/SpGdprConsentWrapperAndroid.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Collections.Generic;
1+
using Newtonsoft.Json;
2+
using System.Collections.Generic;
23

34
namespace ConsentManagementProviderLib.Json
45
{
@@ -8,5 +9,7 @@ internal class SpGdprConsentWrapperAndroid
89
public string euconsent;
910
public Dictionary<string, object> tcData;
1011
public Dictionary<string, Dictionary<string, object>> grants;
12+
[JsonProperty("googleConsentMode")]
13+
public GCMDataWrapper gcmStatus;
1114
}
1215
}

0 commit comments

Comments
 (0)