Skip to content

Commit 3699ed4

Browse files
authored
Merge pull request #19 from SourcePointUSA/DIA-2884-fix-onConsentReady-onSpFinished-race-condition-Android
DIA-2884 fix onConsentReady-onSpFinished race condition for Android
2 parents e93e49c + c7f537b commit 3699ed4

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Assets/ConsentManagementProvider/Scripts/wrapper/Android/SpClientProxy.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ AndroidJavaObject onAction(AndroidJavaObject view, AndroidJavaObject actionType)
5858
void onConsentReady(string spConsents)
5959
{
6060
CmpDebugUtil.Log("I've reached the C# onConsentReady with json string: " + spConsents);
61-
SpConsents consents = JsonUnwrapper.UnwrapSpConsentsAndroid(spConsents);
62-
_spConsents = consents;
63-
ConsentMessenger.Broadcast<IOnConsentReady>(consents);
6461
}
6562

6663
/**
@@ -71,11 +68,11 @@ void onSpFinished(string spConsents)
7168
CmpDebugUtil.ForceEnableNextCmpLog();
7269
CmpDebugUtil.LogWarning($"I've reached the C# onSpFinished with JSON spConsents={spConsents}");
7370
Console.WriteLine($"spConsents= `{spConsents}");
74-
7571
try
7672
{
7773
SpConsents consents = JsonUnwrapper.UnwrapSpConsentsAndroid(spConsents);
7874
_spConsents = consents;
75+
ConsentMessenger.Broadcast<IOnConsentReady>(consents);
7976
ConsentMessenger.Broadcast<IOnConsentSpFinished>(consents);
8077
}
8178
catch (Exception e)

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 2.1.3
2+
* Fixed `onConsentReady` - `onSpFinished` race condition for android
3+
14
# 2.1.2
25
* Miscellaneous fixes
36
* Improve logging system and error handling

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "com.sourcepoint.unitycmp",
33
"displayName": "Sourcepoint Consent Message Plugin",
4-
"version": "2.1.2",
4+
"version": "2.1.3",
55
"unity": "2021.3",
66
"description": "Native UI Privacy Manager for both GDPR and CCPA legislations.",
77
"author": {
Binary file not shown.

0 commit comments

Comments
 (0)