/packages/modules/AdServices/adservices/tests/unittest/ui/src/com/android/adservices/service/ui/util/ |
D | UxEngineUtilTest.java | 71 private ConsentManager mConsentManager; field in UxEngineUtilTest 103 doReturn(true).when(mConsentManager).isEntryPointEnabled(); in setup() 109 ExtendedMockito.doReturn(mConsentManager).when(() -> ConsentManager.getInstance()); in setup() 136 assertThat(mUxEngineUtil.getEligibleUxCollection(mConsentManager, mUxStatesManager)) in getEligibleUxCollectionTest_adServicesDisabled() 142 doReturn(false).when(mConsentManager).isEntryPointEnabled(); in getEligibleUxCollectionTest_entryPointDisabled() 144 assertThat(mUxEngineUtil.getEligibleUxCollection(mConsentManager, mUxStatesManager)) in getEligibleUxCollectionTest_entryPointDisabled() 151 doReturn(true).when(mConsentManager).isAdultAccount(); in getEligibleUxCollectionTest_adultUserGaFlagOn() 153 assertThat(mUxEngineUtil.getEligibleUxCollection(mConsentManager, mUxStatesManager)) in getEligibleUxCollectionTest_adultUserGaFlagOn() 160 doReturn(true).when(mConsentManager).isAdultAccount(); in getEligibleUxCollectionTest_adultUserGaFlagOff() 162 assertThat(mUxEngineUtil.getEligibleUxCollection(mConsentManager, mUxStatesManager)) in getEligibleUxCollectionTest_adultUserGaFlagOff() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/ui/src/com/android/adservices/service/ui/enrollment/ |
D | PasReconsentNotificationChannelTest.java | 62 @Mock private ConsentManager mConsentManager; field in PasReconsentNotificationChannelTest 87 doReturn(false).when(mConsentManager).isOtaAdultUserFromRvc(); in setup() 101 doReturn(true).when(mConsentManager).wasPasNotificationDisplayed(); in isEligibleTest_pasNotificationAlreadyDisplayed() 102 doReturn(REVOKED).when(mConsentManager).getConsent(any()); in isEligibleTest_pasNotificationAlreadyDisplayed() 107 mConsentManager, in isEligibleTest_pasNotificationAlreadyDisplayed() 114 doReturn(false).when(mConsentManager).wasGaUxNotificationDisplayed(); in isEligibleTest_NoManualInteraction_consentRevoked_pas() 115 doReturn(false).when(mConsentManager).wasNotificationDisplayed(); in isEligibleTest_NoManualInteraction_consentRevoked_pas() 116 doReturn(false).when(mConsentManager).wasU18NotificationDisplayed(); in isEligibleTest_NoManualInteraction_consentRevoked_pas() 117 doReturn(false).when(mConsentManager).wasPasNotificationDisplayed(); in isEligibleTest_NoManualInteraction_consentRevoked_pas() 119 .when(mConsentManager) in isEligibleTest_NoManualInteraction_consentRevoked_pas() [all …]
|
D | ReconsentNotificationChannelTest.java | 60 @Mock private ConsentManager mConsentManager; field in ReconsentNotificationChannelTest 96 doReturn(false).when(mConsentManager).wasNotificationDisplayed(); in isEligibleTest_nonBetaUser() 100 mPrivacySandboxUxCollection, mConsentManager, mUxStatesManager)) in isEligibleTest_nonBetaUser() 106 doReturn(true).when(mConsentManager).wasNotificationDisplayed(); in isEligibleTest_nonManualOptOutBetaUser() 107 doReturn(mAdServicesApiConsent).when(mConsentManager).getConsent(); in isEligibleTest_nonManualOptOutBetaUser() 110 .when(mConsentManager) in isEligibleTest_nonManualOptOutBetaUser() 115 mPrivacySandboxUxCollection, mConsentManager, mUxStatesManager)) in isEligibleTest_nonManualOptOutBetaUser() 121 doReturn(true).when(mConsentManager).wasNotificationDisplayed(); in isEligibleTest_manualOptOutBetaUser() 122 doReturn(mAdServicesApiConsent).when(mConsentManager).getConsent(); in isEligibleTest_manualOptOutBetaUser() 125 .when(mConsentManager) in isEligibleTest_manualOptOutBetaUser() [all …]
|
D | PasFirstConsentNotificationChannelTest.java | 54 @Mock private ConsentManager mConsentManager; field in PasFirstConsentNotificationChannelTest 90 doReturn(true).when(mConsentManager).wasPasNotificationDisplayed(); in isEligibleTest_pasNotificationAlreadyDisplayed() 95 mConsentManager, in isEligibleTest_pasNotificationAlreadyDisplayed() 102 doReturn(false).when(mConsentManager).wasGaUxNotificationDisplayed(); in isEligibleTest_NoManualInteraction_consentRevoked_pas() 103 doReturn(false).when(mConsentManager).wasNotificationDisplayed(); in isEligibleTest_NoManualInteraction_consentRevoked_pas() 104 doReturn(false).when(mConsentManager).wasU18NotificationDisplayed(); in isEligibleTest_NoManualInteraction_consentRevoked_pas() 105 doReturn(false).when(mConsentManager).wasPasNotificationDisplayed(); in isEligibleTest_NoManualInteraction_consentRevoked_pas() 107 .when(mConsentManager) in isEligibleTest_NoManualInteraction_consentRevoked_pas() 109 doReturn(REVOKED).when(mConsentManager).getConsent(any()); in isEligibleTest_NoManualInteraction_consentRevoked_pas() 114 mConsentManager, in isEligibleTest_NoManualInteraction_consentRevoked_pas() [all …]
|
D | AlreadyEnrolledChannelTest.java | 48 @Mock private ConsentManager mConsentManager; field in AlreadyEnrolledChannelTest 58 doReturn(true).when(mConsentManager).wasGaUxNotificationDisplayed(); in isEligibleTest_gaUxGaNotificationAlreadyDisplayed() 63 mConsentManager, in isEligibleTest_gaUxGaNotificationAlreadyDisplayed() 70 doReturn(false).when(mConsentManager).wasGaUxNotificationDisplayed(); in isEligibleTest_gaUxGaNotificationNotDisplayed() 74 mConsentManager, in isEligibleTest_gaUxGaNotificationNotDisplayed() 81 doReturn(true).when(mConsentManager).wasNotificationDisplayed(); in isEligibleTest_betaUxNotificationAlreadyDisplayed() 86 mConsentManager, in isEligibleTest_betaUxNotificationAlreadyDisplayed() 93 doReturn(false).when(mConsentManager).wasNotificationDisplayed(); in isEligibleTest_betaUxNotificationNotDisplayed() 98 mConsentManager, in isEligibleTest_betaUxNotificationNotDisplayed() 105 doReturn(true).when(mConsentManager).wasU18NotificationDisplayed(); in isEligibleTest_u18UxNotificationAlreadyDisplayed() [all …]
|
D | FirstConsentNotificationChannelTest.java | 50 @Mock private ConsentManager mConsentManager; field in FirstConsentNotificationChannelTest 64 doReturn(true).when(mConsentManager).wasGaUxNotificationDisplayed(); in isEligibleTest_gaNotificationAlreadyDisplayed() 69 mConsentManager, in isEligibleTest_gaNotificationAlreadyDisplayed() 76 doReturn(true).when(mConsentManager).wasNotificationDisplayed(); in isEligibleTest_betaNotificationAlreadyDisplayed() 81 mConsentManager, in isEligibleTest_betaNotificationAlreadyDisplayed() 88 doReturn(true).when(mConsentManager).wasU18NotificationDisplayed(); in isEligibleTest_u18NotificationAlreadyDisplayed() 93 mConsentManager, in isEligibleTest_u18NotificationAlreadyDisplayed() 100 doReturn(false).when(mConsentManager).wasGaUxNotificationDisplayed(); in isEligibleTest_noNotificationEverDisplayed() 101 doReturn(false).when(mConsentManager).wasNotificationDisplayed(); in isEligibleTest_noNotificationEverDisplayed() 102 doReturn(false).when(mConsentManager).wasU18NotificationDisplayed(); in isEligibleTest_noNotificationEverDisplayed() [all …]
|
D | U18DetentionChannelTest.java | 55 @Mock private ConsentManager mConsentManager; field in U18DetentionChannelTest 95 mConsentManager, in isEligibleTest_U18UxDetentionChannelDisabled() 102 doReturn(true).when(mConsentManager).wasGaUxNotificationDisplayed(); in isEligibleTest_detainedGaUser() 107 mConsentManager, in isEligibleTest_detainedGaUser() 114 doReturn(true).when(mConsentManager).wasNotificationDisplayed(); in isEligibleTest_detainedBetaUser() 119 mConsentManager, in isEligibleTest_detainedBetaUser() 126 doReturn(false).when(mConsentManager).wasGaUxNotificationDisplayed(); in isEligibleTest_nonU18User() 131 mConsentManager, in isEligibleTest_nonU18User() 138 doReturn(false).when(mConsentManager).wasGaUxNotificationDisplayed(); in isEligibleTest_nonBetUxCheck() 143 mConsentManager, in isEligibleTest_nonBetUxCheck() [all …]
|
D | ConsentNotificationResetChannelTest.java | 56 private ConsentManager mConsentManager; field in ConsentNotificationResetChannelTest 96 mConsentManager, in isEligibleTest_emptyToken() 112 mConsentManager, in isEligibleTest_newTokenWriteSucceeded() 128 mConsentManager, in isEligibleTest_newTokenWriteFailed() 147 mConsentManager, in isEligibleTest_sameToken() 155 mConsentNotificationResetChannel.enroll(null, mConsentManager); in enrollTest() 158 verify(mConsentManager).recordNotificationDisplayed(false); in enrollTest() 159 verify(mConsentManager).recordGaUxNotificationDisplayed(false); in enrollTest() 162 verify(mConsentManager).recordPasNotificationDisplayed(false); in enrollTest() 165 verify(mConsentManager).setU18NotificationDisplayed(false); in enrollTest() [all …]
|
D | RvcPostOTAChannelTest.java | 57 @Mock private ConsentManager mConsentManager; field in RvcPostOTAChannelTest 91 doReturn(true).when(mConsentManager).isOtaAdultUserFromRvc(); in isEligibleTest_isRvcAdultUser() 96 mConsentManager, in isEligibleTest_isRvcAdultUser() 104 doReturn(false).when(mConsentManager).isOtaAdultUserFromRvc(); in isEligibleTest_notRvcAdultUser() 109 mConsentManager, in isEligibleTest_notRvcAdultUser() 117 .when(mConsentManager) in enrollTest_optOutMsmt() 119 mRvcPostOTAChannel.enroll(mContext, mConsentManager); in enrollTest_optOutMsmt() 131 .when(mConsentManager) in enrollTest_optInMsmt() 134 mRvcPostOTAChannel.enroll(mContext, mConsentManager); in enrollTest_optInMsmt()
|
/packages/modules/AdServices/adservices/tests/unittest/ui/src/com/android/adservices/service/ui/ |
D | UxEngineTest.java | 74 private ConsentManager mConsentManager; field in UxEngineTest 100 ExtendedMockito.doReturn(mConsentManager).when(() -> ConsentManager.getInstance()); in setup() 125 doReturn(AdServicesApiConsent.GIVEN).when(mConsentManager).getConsent(); in setup() 127 .when(mConsentManager) in setup() 132 mContext, mConsentManager, mUxStatesManager, UxEngineUtil.getInstance()); in setup() 162 verify(mConsentManager, never()).isEntryPointEnabled(); in startTest_uxDisabled() 165 verify(mConsentManager, never()).setUx(UNSUPPORTED_UX); in startTest_uxDisabled() 166 verify(mConsentManager, never()).setEnrollmentChannel(UNSUPPORTED_UX, null); in startTest_uxDisabled() 190 doReturn(false).when(mConsentManager).isEntryPointEnabled(); in startTest_entryPointDisabled() 198 verify(mConsentManager).isEntryPointEnabled(); in startTest_entryPointDisabled() [all …]
|
/packages/modules/AdServices/adservices/apk/tests/notification/src/com/android/adservices/ui/notifications/ |
D | ConsentNotificationTriggerTest.java | 122 @Mock private ConsentManager mConsentManager; field in ConsentNotificationTriggerTest 136 doReturn(mConsentManager).when(() -> ConsentManager.getInstance()); in setUp() 173 verify(mConsentManager, times(2)).getDefaultConsent(); in testEuNotification_gaUxFlagEnabled() 174 verify(mConsentManager, times(2)).getDefaultAdIdState(); in testEuNotification_gaUxFlagEnabled() 175 verify(mConsentManager).recordTopicsDefaultConsent(false); in testEuNotification_gaUxFlagEnabled() 176 verify(mConsentManager).recordFledgeDefaultConsent(false); in testEuNotification_gaUxFlagEnabled() 177 verify(mConsentManager).recordMeasurementDefaultConsent(false); in testEuNotification_gaUxFlagEnabled() 178 verify(mConsentManager).disable(mSpyContext, AdServicesApiType.FLEDGE); in testEuNotification_gaUxFlagEnabled() 179 verify(mConsentManager).disable(mSpyContext, AdServicesApiType.TOPICS); in testEuNotification_gaUxFlagEnabled() 180 verify(mConsentManager).disable(mSpyContext, AdServicesApiType.MEASUREMENTS); in testEuNotification_gaUxFlagEnabled() [all …]
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/ui/data/ |
D | UxStatesManager.java | 58 private final ConsentManager mConsentManager; field in UxStatesManager 71 mConsentManager = consentManager; in UxStatesManager() 94 mConsentManager.setAdIdEnabled(adServicesStates.isAdIdEnabled()); in persistAdServicesStates() 96 if (mConsentManager.isU18Account() == null || !mConsentManager.isU18Account()) { in persistAdServicesStates() 97 mConsentManager.setU18Account(adServicesStates.isU18Account()); in persistAdServicesStates() 99 mConsentManager.setAdultAccount(adServicesStates.isAdultAccount()); in persistAdServicesStates() 100 mConsentManager.setEntryPointEnabled(adServicesStates.isPrivacySandboxUiEnabled()); in persistAdServicesStates() 116 mUx = mConsentManager.getUx(); in getUx() 125 mEnrollmentChannel = mConsentManager.getEnrollmentChannel(mUx); in getEnrollmentChannel() 146 mConsentManager.wasGaUxNotificationDisplayed() in isEnrolledUser() [all …]
|
/packages/modules/AdServices/adservices/apk/tests/settings/src/com/android/adservices/ui/settings/ |
D | DialogFragmentTest.java | 80 private ConsentManager mConsentManager; field in DialogFragmentTest 98 doReturn(topicsList).when(mConsentManager).getKnownTopicsWithConsent(); in setup() 104 doReturn(blockedTopicsList).when(mConsentManager).getTopicsWithRevokedConsent(); in setup() 110 doReturn(appsList).when(mConsentManager).getKnownAppsWithConsent(); in setup() 115 doReturn(blockedAppsList).when(mConsentManager).getAppsWithRevokedConsent(); in setup() 117 doNothing().when(mConsentManager).resetTopicsAndBlockedTopics(); in setup() 118 doNothing().when(mConsentManager).resetTopics(); in setup() 119 doNothing().when(mConsentManager).revokeConsentForTopic(any(Topic.class)); in setup() 120 doNothing().when(mConsentManager).restoreConsentForTopic(any(Topic.class)); in setup() 121 doNothing().when(mConsentManager).resetAppsAndBlockedApps(); in setup() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/ |
D | AdServicesCommonServiceImplTest.java | 116 @Mock private ConsentManager mConsentManager; field in AdServicesCommonServiceImplTest 169 ExtendedMockito.doReturn(mConsentManager).when(() -> ConsentManager.getInstance()); in setup() 206 doReturn(GA_UX).when(mConsentManager).getUx(); in isAdServiceEnabledTest_userNotEnrolledEntryPointLogicV2() 281 doReturn(false).when(mConsentManager).wasGaUxNotificationDisplayed(); in isAdservicesEnabledReconsentTest_happycase() 282 doReturn(AdServicesApiConsent.getConsent(true)).when(mConsentManager).getConsent(); in isAdservicesEnabledReconsentTest_happycase() 297 doReturn(false).when(mConsentManager).wasGaUxNotificationDisplayed(); in isAdservicesEnabledReconsentTest_gaUxFeatureDisabled() 298 doReturn(AdServicesApiConsent.getConsent(true)).when(mConsentManager).getConsent(); in isAdservicesEnabledReconsentTest_gaUxFeatureDisabled() 313 doReturn(false).when(mConsentManager).wasGaUxNotificationDisplayed(); in isAdservicesEnabledReconsentTest_deviceNotEu() 315 doReturn(AdServicesApiConsent.getConsent(true)).when(mConsentManager).getConsent(); in isAdservicesEnabledReconsentTest_deviceNotEu() 331 doReturn(true).when(mConsentManager).wasGaUxNotificationDisplayed(); in isAdservicesEnabledReconsentTest_gaUxNotificationDisplayed() [all …]
|
/packages/modules/AdServices/adservices/apk/java/com/android/adservices/ui/settings/viewmodels/ |
D | MainViewModel.java | 47 private final ConsentManager mConsentManager; field in MainViewModel 63 mConsentManager = consentManager; in MainViewModel() 84 mConsentManager.enable(getApplication()); in setConsent() 86 mConsentManager.disable(getApplication()); in setConsent() 125 return mConsentManager.getConsent().isGiven(); in getConsentFromConsentManager() 129 return mConsentManager.getConsent(AdServicesApiType.MEASUREMENTS).isGiven(); in getMeasurementConsentFromConsentManager() 133 return mConsentManager.getConsent(AdServicesApiType.TOPICS).isGiven(); in getTopicsConsentFromConsentManager() 137 return mConsentManager.getConsent(AdServicesApiType.FLEDGE).isGiven(); in getAppsConsentFromConsentManager() 141 return mConsentManager.getKnownTopicsWithConsent().size(); in getCountOfTopics() 145 return mConsentManager.getKnownAppsWithConsent().size(); in getCountOfApps()
|
D | AppsViewModel.java | 53 private final ConsentManager mConsentManager; field in AppsViewModel 68 mConsentManager = ConsentManager.getInstance(); in AppsViewModel() 81 mConsentManager = consentManager; in AppsViewModel() 111 mConsentManager.revokeConsentForApp(app); in revokeAppConsent() 127 mConsentManager.resetApps(); in resetApps() 129 mConsentManager.setPaDataReset(true); in resetApps() 171 return mConsentManager.getKnownAppsWithConsent(); in getAppsFromConsentManager() 175 return mConsentManager.getAppsWithRevokedConsent(); in getBlockedAppsFromConsentManager() 195 mConsentManager.enable(getApplication(), AdServicesApiType.FLEDGE); in setAppsConsent() 197 mConsentManager.disable(getApplication(), AdServicesApiType.FLEDGE); in setAppsConsent() [all …]
|
D | TopicsViewModel.java | 52 private final ConsentManager mConsentManager; field in TopicsViewModel 66 mConsentManager = ConsentManager.getInstance(); in TopicsViewModel() 81 mConsentManager = consentManager; in TopicsViewModel() 111 mConsentManager.revokeConsentForTopic(topic); in revokeTopicConsent() 127 mConsentManager.resetTopics(); in resetTopics() 170 return mConsentManager.getKnownTopicsWithConsent(); in getTopicsFromConsentManager() 174 return mConsentManager.getTopicsWithRevokedConsent(); in getBlockedTopicsFromConsentManager() 195 mConsentManager.enable(getApplication(), AdServicesApiType.TOPICS); in setTopicsConsent() 197 mConsentManager.disable(getApplication(), AdServicesApiType.TOPICS); in setTopicsConsent() 221 return mConsentManager.getConsent(AdServicesApiType.TOPICS).isGiven(); in getTopicsConsentFromConsentManager()
|
D | MeasurementViewModel.java | 48 private final ConsentManager mConsentManager; field in MeasurementViewModel 59 mConsentManager = ConsentManager.getInstance(); in MeasurementViewModel() 66 mConsentManager = consentManager; in MeasurementViewModel() 88 mConsentManager.enable(getApplication(), AdServicesApiType.MEASUREMENTS); in setMeasurementConsent() 90 mConsentManager.disable(getApplication(), AdServicesApiType.MEASUREMENTS); in setMeasurementConsent() 102 mConsentManager.resetMeasurement(); in resetMeasurement() 104 mConsentManager.setMeasurementDataReset(true); in resetMeasurement() 154 return mConsentManager.getConsent(AdServicesApiType.MEASUREMENTS).isGiven(); in getMeasurementConsentFromConsentManager()
|
/packages/modules/AdServices/adservices/tests/unittest/ui/src/com/android/adservices/service/ui/ux/ |
D | BetaUxTest.java | 44 @Mock private ConsentManager mConsentManager; field in BetaUxTest 69 doReturn(true).when(mConsentManager).isAdultAccount(); in isEligibleTest_adultUserWithGaFlagOn() 72 assertThat(mBetaUx.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_adultUserWithGaFlagOn() 77 doReturn(true).when(mConsentManager).isAdultAccount(); in isEligibleTest_adultUserWithGaFlagOff() 80 assertThat(mBetaUx.isEligible(mConsentManager, mUxStatesManager)).isTrue(); in isEligibleTest_adultUserWithGaFlagOff() 85 doReturn(false).when(mConsentManager).isAdultAccount(); in isEligibleTest_nonAdultUserWithGaFlagOn() 88 assertThat(mBetaUx.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_nonAdultUserWithGaFlagOn() 93 doReturn(false).when(mConsentManager).isAdultAccount(); in isEligibleTest_nonAdultUserWithGaFlagOff() 96 assertThat(mBetaUx.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_nonAdultUserWithGaFlagOff()
|
D | GaUxTest.java | 44 @Mock private ConsentManager mConsentManager; field in GaUxTest 69 doReturn(true).when(mConsentManager).isAdultAccount(); in isEligibleTest_adultUserWithGaFlagOn() 72 assertThat(mGaUx.isEligible(mConsentManager, mUxStatesManager)).isTrue(); in isEligibleTest_adultUserWithGaFlagOn() 77 doReturn(true).when(mConsentManager).isAdultAccount(); in isEligibleTest_adultUserWithGaFlagOff() 80 assertThat(mGaUx.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_adultUserWithGaFlagOff() 85 doReturn(false).when(mConsentManager).isAdultAccount(); in isEligibleTest_nonAdultUserWithGaFlagOn() 88 assertThat(mGaUx.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_nonAdultUserWithGaFlagOn() 93 doReturn(false).when(mConsentManager).isAdultAccount(); in isEligibleTest_nonAdultUserWithGaFlagOff() 96 assertThat(mGaUx.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_nonAdultUserWithGaFlagOff()
|
D | U18UxTest.java | 44 @Mock private ConsentManager mConsentManager; field in U18UxTest 69 doReturn(true).when(mConsentManager).isU18Account(); in isEligibleTest_u18UserWithU18FlagOn() 72 assertThat(mU18Ux.isEligible(mConsentManager, mUxStatesManager)).isTrue(); in isEligibleTest_u18UserWithU18FlagOn() 77 doReturn(true).when(mConsentManager).isU18Account(); in isEligibleTest_u18UserWithU18FlagOff() 80 assertThat(mU18Ux.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_u18UserWithU18FlagOff() 85 doReturn(false).when(mConsentManager).isU18Account(); in isEligibleTest_nonU18UserWithU18FlagOn() 88 assertThat(mU18Ux.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_nonU18UserWithU18FlagOn() 93 doReturn(false).when(mConsentManager).isAdultAccount(); in isEligibleTest_nonU18UserWithU18FlagOff() 96 assertThat(mU18Ux.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_nonU18UserWithU18FlagOff()
|
/packages/modules/AdServices/adservices/tests/unittest/ui/src/com/android/adservices/service/consent/ |
D | ConsentManagerTest.java | 222 private ConsentManager mConsentManager; field in ConsentManagerTest 265 mConsentManager = getConsentManagerByConsentSourceOfTruth(Flags.PPAPI_ONLY); in setup() 618 mConsentManager.enable(mSpyContext); in testJobsAreScheduledAfterEnablingKillSwitchOff() 672 mConsentManager.enable(mSpyContext); in testJobsAreNotScheduledAfterEnablingKillSwitchOn() 739 mConsentManager.disable(mSpyContext); in testJobsAreUnscheduledAfterDisabling() 777 mConsentManager.disable(mSpyContext); in testDataIsResetAfterConsentIsRevoked() 798 mConsentManager.disable(mSpyContext); in testDataIsResetAfterConsentIsRevokedSignalsDisabled() 820 mConsentManager.disable(mSpyContext); in testDataIsResetAfterConsentIsRevokedFrequencyCapFilteringDisabled() 842 mConsentManager.disable(mSpyContext); in testDataIsResetAfterConsentIsRevokedAppInstallFilteringDisabled() 862 mConsentManager.enable(mSpyContext); in testDataIsResetAfterConsentIsGiven() [all …]
|
D | ConsentManagerV2Test.java | 216 private ConsentManagerV2 mConsentManager; field in ConsentManagerV2Test 289 mConsentManager = getConsentManagerByConsentSourceOfTruth(Flags.PPAPI_ONLY); in setup() 611 mConsentManager.enable(mSpyContext); in testJobsAreScheduledAfterEnablingKillSwitchOff() 665 mConsentManager.enable(mSpyContext); in testJobsAreNotScheduledAfterEnablingKillSwitchOn() 732 mConsentManager.disable(mSpyContext); in testJobsAreUnscheduledAfterDisabling() 770 mConsentManager.disable(mSpyContext); in testDataIsResetAfterConsentIsRevoked() 791 mConsentManager.disable(mSpyContext); in testDataIsResetAfterConsentIsRevokedFrequencyCapFilteringDisabled() 812 mConsentManager.disable(mSpyContext); in testDataIsResetAfterConsentIsRevokedAppInstallFilteringDisabled() 831 mConsentManager.enable(mSpyContext); in testDataIsResetAfterConsentIsGiven() 852 mConsentManager.enable(mSpyContext); in testDataIsResetAfterConsentIsGivenFrequencyCapFilteringDisabled() [all …]
|
/packages/modules/AdServices/adservices/apk/unittest/src/com/android/adservices/ui/settings/viewmodels/ |
D | TopicsViewModelTest.java | 49 @Mock private ConsentManager mConsentManager; field in TopicsViewModelTest 66 ApplicationProvider.getApplicationContext(), mConsentManager, true); in setup() 69 ApplicationProvider.getApplicationContext(), mConsentManager); in setup() 84 doReturn(topicsList).when(mConsentManager).getKnownTopicsWithConsent(); in testGetTopicsReturnsNoTopics() 88 ApplicationProvider.getApplicationContext(), mConsentManager, true); in testGetTopicsReturnsNoTopics() 101 doReturn(topicsList).when(mConsentManager).getKnownTopicsWithConsent(); in testGetTopicsReturnsTopics() 105 ApplicationProvider.getApplicationContext(), mConsentManager, true); in testGetTopicsReturnsTopics() 116 verify(mConsentManager, times(1)).revokeConsentForTopic(topic1); in testBlockTopic() 125 verify(mConsentManager, times(1)).restoreConsentForTopic(topic1); in testRestoreTopic()
|
D | MainViewModelTest.java | 48 @Mock private ConsentManager mConsentManager; field in MainViewModelTest 56 ExtendedMockito.doReturn(mConsentManager).when(() -> ConsentManager.getInstance()); in setup() 57 doReturn(AdServicesApiConsent.GIVEN).when(mConsentManager).getConsent(); in setup() 59 new MainViewModel(ApplicationProvider.getApplicationContext(), mConsentManager); in setup() 71 doReturn(AdServicesApiConsent.REVOKED).when(mConsentManager).getConsent(); in testGetConsentReturnsFalse() 73 new MainViewModel(ApplicationProvider.getApplicationContext(), mConsentManager); in testGetConsentReturnsFalse() 83 verify(mConsentManager, times(1)).enable(any(Context.class)); in testSetConsentTrue() 91 verify(mConsentManager, times(1)).disable(any(Context.class)); in testSetConsentFalse()
|