001package com.intentsoftware.addapptr; 002 003/** 004 * Allows to set the status of Non-IAB consent. Will also read the IAB consent string from SharedPreferences if available. 005 */ 006public final class SimpleConsent extends ConsentImplementation { 007 008 private final NonIABConsent nonIABConsent; 009 010 /** 011 * Creates the {@link SimpleConsent} instance. 012 * 013 * @param nonIABConsent The status of GDPR consent for non-IAB partners. 014 */ 015 public SimpleConsent(NonIABConsent nonIABConsent) { 016 this.nonIABConsent = nonIABConsent; 017 } 018 019 NonIABConsent getNonIABConsent() { 020 return nonIABConsent; 021 } 022 023 @Override 024 NonIABConsent getConsentForNetwork(AdNetwork network) { 025 return nonIABConsent; 026 } 027 028 @Override 029 public String toString() { 030 return "SimpleConsent{" + 031 "nonIABConsent=" + nonIABConsent + 032 ", consentStringVersion= " + getConsentStringVersion() + 033 ", consentString=" + getConsentString() + 034 "} " + super.toString(); 035 } 036}