Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import android.preference.PreferenceManager

/**
* Read out the Consent string.
* The class uses the proposed identifiers: "IABTCF_CmpSdkID" and "IABTCF_TCString"
* The class uses the proposed identifier: "IABTCF_TCString"
*/
class ConsentHelper {

Expand All @@ -16,15 +16,7 @@ class ConsentHelper {
* @return Consent string
*/
fun getString(context: Context): String? {

val mPreferences = PreferenceManager.getDefaultSharedPreferences(context)
val consentString = mPreferences.getString("IABTCF_TCString", "")
val cmpPresent = mPreferences.getInt("IABTCF_CmpSdkID", 0)

if (cmpPresent > 0) {
return consentString
} else {
return null
}
return mPreferences.getString("IABTCF_TCString", null)
}
}