Skip to content

Commit

Permalink
Merge pull request #224 from prebid/TCF_preference_over_GDPR
Browse files Browse the repository at this point in the history
Preferred TCF PurposeConsent anf TCF ConsentString over GDPR
  • Loading branch information
ppuviarasu authored Dec 10, 2020
2 parents d5ba6db + 9e91185 commit a43ca42
Showing 1 changed file with 16 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,15 @@ public static String getGDPRConsentString() {
String gdprConsent = null;

try {

String pbGdprConsent = StorageUtils.getPbGdprConsent();
if (!TextUtils.isEmpty(pbGdprConsent)) {
gdprConsent = pbGdprConsent;
// TCF consent string
String iabGdprConsent = StorageUtils.getIabGdprConsent();
if (!TextUtils.isEmpty(iabGdprConsent)) {
gdprConsent = iabGdprConsent;
} else {
String iabGdprConsent = StorageUtils.getIabGdprConsent();
if (!TextUtils.isEmpty(iabGdprConsent)) {
gdprConsent = iabGdprConsent;
// GDPR consent string
String pbGdprConsent = StorageUtils.getPbGdprConsent();
if (!TextUtils.isEmpty(pbGdprConsent)) {
gdprConsent = pbGdprConsent;
}
}
} catch (PbContextNullException ex) {
Expand Down Expand Up @@ -164,18 +165,16 @@ public static String getPurposeConsents() {
String savedPurposeConsents = null;

try {

String pbPurposeConsentsString = StorageUtils.getPbPurposeConsents();
if (pbPurposeConsentsString != null) {
savedPurposeConsents = pbPurposeConsentsString;
// TCF purpose consent
String iabPurposeConsentsString = StorageUtils.getIabPurposeConsents();
if (iabPurposeConsentsString != null) {
savedPurposeConsents = iabPurposeConsentsString;
} else {

String iabPurposeConsentsString = StorageUtils.getIabPurposeConsents();

if (iabPurposeConsentsString != null) {
savedPurposeConsents = iabPurposeConsentsString;
// GDPR purpose consent
String pbPurposeConsentsString = StorageUtils.getPbPurposeConsents();
if (pbPurposeConsentsString != null) {
savedPurposeConsents = pbPurposeConsentsString;
}

}

} catch (PbContextNullException ex) {
Expand Down

0 comments on commit a43ca42

Please sign in to comment.