(consentSettings: Map<ConsentType, ConsentStatus>)
| 84 | } |
| 85 | |
| 86 | setConsent(consentSettings: Map<ConsentType, ConsentStatus>): void { |
| 87 | const dictionary = {}; |
| 88 | consentSettings.forEach((value, key) => { |
| 89 | let nativeKey; |
| 90 | let nativeValue; |
| 91 | switch (key) { |
| 92 | case ConsentType.Ad_Storage: |
| 93 | nativeKey = FIRConsentTypeAdStorage; |
| 94 | break; |
| 95 | case ConsentType.Analytics_Storage: |
| 96 | nativeKey = FIRConsentTypeAnalyticsStorage; |
| 97 | break; |
| 98 | case ConsentType.Ad_User_Data: |
| 99 | nativeKey = FIRConsentTypeAdUserData; |
| 100 | break; |
| 101 | case ConsentType.Ad_Personalization: |
| 102 | nativeKey = FIRConsentTypeAdPersonalization; |
| 103 | break; |
| 104 | } |
| 105 | |
| 106 | switch (value) { |
| 107 | case ConsentStatus.Denied: |
| 108 | nativeValue = FIRConsentStatusDenied; |
| 109 | break; |
| 110 | case ConsentStatus.Granted: |
| 111 | nativeValue = FIRConsentStatusGranted; |
| 112 | break; |
| 113 | } |
| 114 | if (nativeKey && nativeValue) { |
| 115 | dictionary[nativeKey] = nativeValue; |
| 116 | } |
| 117 | }); |
| 118 | FIRAnalytics.setConsent(dictionary as any); |
| 119 | } |
| 120 | } |
nothing calls this directly
no test coverage detected