diff --git a/PrebidMobile/PrebidMobile-core/src/main/java/org/prebid/mobile/TargetingParams.java b/PrebidMobile/PrebidMobile-core/src/main/java/org/prebid/mobile/TargetingParams.java index 9ed12af6b..288efe975 100644 --- a/PrebidMobile/PrebidMobile-core/src/main/java/org/prebid/mobile/TargetingParams.java +++ b/PrebidMobile/PrebidMobile-core/src/main/java/org/prebid/mobile/TargetingParams.java @@ -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) { @@ -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) {