Skip to content

Commit

Permalink
Improving consent logs
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtursKadikis committed Jan 25, 2024
1 parent 24d4126 commit 4c12dba
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sdk/src/main/java/ly/count/android/sdk/ConnectionQueue.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ public void beginSession(boolean locationDisabled, @Nullable String locationCoun
L.d("[Connection Queue] beginSession");

if (!consentProvider.getConsent(Countly.CountlyFeatureNames.sessions)) {
L.d("[Connection Queue] request ignored, 'sessions' consent not given");
return;
}

Expand Down Expand Up @@ -209,6 +210,7 @@ public void enrollToKeys(@NonNull String[] keys) {
L.d("[Connection Queue] enrollToKeys");

if (!consentProvider.getConsent(Countly.CountlyFeatureNames.remoteConfig)) {
L.d("[Connection Queue] request ignored, 'remoteConfig' consent not given");
return;
}

Expand All @@ -233,6 +235,7 @@ public void exitForKeys(@NonNull String[] keys) {
L.d("[Connection Queue] exitForKeys");

if (!consentProvider.getConsent(Countly.CountlyFeatureNames.remoteConfig)) {
L.d("[Connection Queue] request ignored, 'remoteConfig' consent not given");
return;
}

Expand Down Expand Up @@ -261,6 +264,7 @@ public void updateSession(final int duration) {
L.d("[Connection Queue] updateSession");

if (!consentProvider.getConsent(Countly.CountlyFeatureNames.sessions)) {
L.d("[Connection Queue] request ignored, 'sessions' consent not given");
return;
}

Expand Down Expand Up @@ -341,6 +345,7 @@ public void endSession(final int duration, String deviceIdOverride) {
L.d("[Connection Queue] endSession");

if (!consentProvider.getConsent(Countly.CountlyFeatureNames.sessions)) {
L.d("[Connection Queue] request ignored, 'sessions' consent not given");
return;
}

Expand Down Expand Up @@ -390,7 +395,7 @@ public void sendUserData(String userdata) {
L.d("[Connection Queue] sendUserData");

if (!consentProvider.getConsent(Countly.CountlyFeatureNames.users)) {
L.d("[Connection Queue] request ignored, 'user' consent not given");
L.d("[Connection Queue] request ignored, 'users' consent not given");
return;
}

Expand Down Expand Up @@ -646,7 +651,7 @@ public void sendAPMAppStart(long durationMs, Long startMs, Long endMs) {
L.d("[Connection Queue] sendAPMAppStart");

if (!consentProvider.getConsent(Countly.CountlyFeatureNames.apm)) {
L.d("[Connection Queue] request ignored, consent not given");
L.d("[Connection Queue] request ignored, 'apm' consent not given");
return;
}
//https://abc.count.ly/i?app_key=xyz&device_id=pts911&apm={"type":"device","name":"app_start","apm_metrics":{"duration": 15000}, "stz": 1584698900, "etz": 1584699900}
Expand Down

0 comments on commit 4c12dba

Please sign in to comment.