Home
last modified time | relevance | path

Searched refs:mUxStatesManager (Results 1 – 23 of 23) sorted by relevance

/packages/modules/AdServices/adservices/tests/unittest/ui/src/com/android/adservices/service/ui/
DUxEngineTest.java72 private UxStatesManager mUxStatesManager; field in UxEngineTest
123 doReturn(true).when(mUxStatesManager).getFlag(KEY_ADSERVICES_ENABLED); in setup()
124 doReturn(true).when(mUxStatesManager).getFlag(KEY_IS_U18_UX_DETENTION_CHANNEL_ENABLED); in setup()
132 mContext, mConsentManager, mUxStatesManager, UxEngineUtil.getInstance()); in setup()
146 doReturn(false).when(mUxStatesManager).getFlag(KEY_ADSERVICES_ENABLED); in startTest_uxDisabled()
158 verify(mUxStatesManager).persistAdServicesStates(adServicesStates); in startTest_uxDisabled()
161 verify(mUxStatesManager).getFlag(KEY_ADSERVICES_ENABLED); in startTest_uxDisabled()
194 verify(mUxStatesManager).persistAdServicesStates(adServicesStates); in startTest_entryPointDisabled()
197 verify(mUxStatesManager).getFlag(KEY_ADSERVICES_ENABLED); in startTest_entryPointDisabled()
201 verify(mUxStatesManager, never()).getFlag(KEY_U18_UX_ENABLED); in startTest_entryPointDisabled()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/ui/src/com/android/adservices/service/ui/util/
DUxEngineUtilTest.java69 private UxStatesManager mUxStatesManager; field in UxEngineUtilTest
104 doReturn(true).when(mUxStatesManager).getFlag(KEY_ADSERVICES_ENABLED); in setup()
105 doReturn(true).when(mUxStatesManager).getFlag(KEY_IS_U18_UX_DETENTION_CHANNEL_ENABLED); in setup()
134 doReturn(false).when(mUxStatesManager).getFlag(KEY_ADSERVICES_ENABLED); in getEligibleUxCollectionTest_adServicesDisabled()
136 assertThat(mUxEngineUtil.getEligibleUxCollection(mConsentManager, mUxStatesManager)) in getEligibleUxCollectionTest_adServicesDisabled()
144 assertThat(mUxEngineUtil.getEligibleUxCollection(mConsentManager, mUxStatesManager)) in getEligibleUxCollectionTest_entryPointDisabled()
150 doReturn(true).when(mUxStatesManager).getFlag(KEY_GA_UX_FEATURE_ENABLED); in getEligibleUxCollectionTest_adultUserGaFlagOn()
153 assertThat(mUxEngineUtil.getEligibleUxCollection(mConsentManager, mUxStatesManager)) in getEligibleUxCollectionTest_adultUserGaFlagOn()
159 doReturn(false).when(mUxStatesManager).getFlag(KEY_GA_UX_FEATURE_ENABLED); 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/data/
DUxStatesManagerTest.java60 private UxStatesManager mUxStatesManager; field in UxStatesManagerTest
88 mUxStatesManager = new UxStatesManager(mContext, mMockFlags, mMockConsentManager); in setup()
107 mUxStatesManager.persistAdServicesStates(new AdServicesStates.Builder().build()); in persistAdServicesStatesTest()
117 assertThat(mUxStatesManager.getFlag("")).isFalse(); in getFlagTest_emptyFlagKey()
124 mUxStatesManager.persistAdServicesStates(new AdServicesStates.Builder().build()); in persistAdServicesStatesTest_u18User()
134 assertThat(mUxStatesManager.getFlag("INVALID_FLAG_KEY")).isFalse(); in getFlagTest_invalidFlagKey()
139 assertThat(mUxStatesManager.getFlag("TRUE_FLAG_KEY")).isTrue(); in getFlagTest_trueFlagKey()
144 assertThat(mUxStatesManager.getFlag("FALSE_FLAG_KEY")).isFalse(); in getFlagTest_falseFlagKey()
151 mUxStatesManager = new UxStatesManager(mContext, mMockFlags, mMockConsentManager); in isEeaDeviceTest_rowDevice()
153 assertThat(mUxStatesManager.isEeaDevice()).isFalse(); in isEeaDeviceTest_rowDevice()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/ui/src/com/android/adservices/service/ui/ux/
DBetaUxTest.java43 @Mock private UxStatesManager mUxStatesManager; field in BetaUxTest
70 doReturn(true).when(mUxStatesManager).getFlag(KEY_GA_UX_FEATURE_ENABLED); in isEligibleTest_adultUserWithGaFlagOn()
72 assertThat(mBetaUx.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_adultUserWithGaFlagOn()
78 doReturn(false).when(mUxStatesManager).getFlag(KEY_GA_UX_FEATURE_ENABLED); in isEligibleTest_adultUserWithGaFlagOff()
80 assertThat(mBetaUx.isEligible(mConsentManager, mUxStatesManager)).isTrue(); in isEligibleTest_adultUserWithGaFlagOff()
86 doReturn(true).when(mUxStatesManager).getFlag(KEY_GA_UX_FEATURE_ENABLED); in isEligibleTest_nonAdultUserWithGaFlagOn()
88 assertThat(mBetaUx.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_nonAdultUserWithGaFlagOn()
94 doReturn(false).when(mUxStatesManager).getFlag(KEY_GA_UX_FEATURE_ENABLED); in isEligibleTest_nonAdultUserWithGaFlagOff()
96 assertThat(mBetaUx.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_nonAdultUserWithGaFlagOff()
DGaUxTest.java43 @Mock private UxStatesManager mUxStatesManager; field in GaUxTest
70 doReturn(true).when(mUxStatesManager).getFlag(KEY_GA_UX_FEATURE_ENABLED); in isEligibleTest_adultUserWithGaFlagOn()
72 assertThat(mGaUx.isEligible(mConsentManager, mUxStatesManager)).isTrue(); in isEligibleTest_adultUserWithGaFlagOn()
78 doReturn(false).when(mUxStatesManager).getFlag(KEY_GA_UX_FEATURE_ENABLED); in isEligibleTest_adultUserWithGaFlagOff()
80 assertThat(mGaUx.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_adultUserWithGaFlagOff()
86 doReturn(true).when(mUxStatesManager).getFlag(KEY_GA_UX_FEATURE_ENABLED); in isEligibleTest_nonAdultUserWithGaFlagOn()
88 assertThat(mGaUx.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_nonAdultUserWithGaFlagOn()
94 doReturn(false).when(mUxStatesManager).getFlag(KEY_GA_UX_FEATURE_ENABLED); in isEligibleTest_nonAdultUserWithGaFlagOff()
96 assertThat(mGaUx.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_nonAdultUserWithGaFlagOff()
DU18UxTest.java43 @Mock private UxStatesManager mUxStatesManager; field in U18UxTest
70 doReturn(true).when(mUxStatesManager).getFlag(KEY_U18_UX_ENABLED); in isEligibleTest_u18UserWithU18FlagOn()
72 assertThat(mU18Ux.isEligible(mConsentManager, mUxStatesManager)).isTrue(); in isEligibleTest_u18UserWithU18FlagOn()
78 doReturn(false).when(mUxStatesManager).getFlag(KEY_U18_UX_ENABLED); in isEligibleTest_u18UserWithU18FlagOff()
80 assertThat(mU18Ux.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_u18UserWithU18FlagOff()
86 doReturn(true).when(mUxStatesManager).getFlag(KEY_U18_UX_ENABLED); in isEligibleTest_nonU18UserWithU18FlagOn()
88 assertThat(mU18Ux.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_nonU18UserWithU18FlagOn()
94 doReturn(false).when(mUxStatesManager).getFlag(KEY_U18_UX_ENABLED); in isEligibleTest_nonU18UserWithU18FlagOff()
96 assertThat(mU18Ux.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_nonU18UserWithU18FlagOff()
DRvcUxTest.java43 @Mock private UxStatesManager mUxStatesManager; field in RvcUxTest
69 doReturn(true).when(mUxStatesManager).getFlag(KEY_RVC_UX_ENABLED); in isEligibleTest_rFlagOn()
71 assertThat(mRvcUx.isEligible(mConsentManager, mUxStatesManager)).isTrue(); in isEligibleTest_rFlagOn()
76 doReturn(false).when(mUxStatesManager).getFlag(KEY_RVC_UX_ENABLED); in isEligibleTest_rFlagOff()
78 assertThat(mRvcUx.isEligible(mConsentManager, mUxStatesManager)).isFalse(); in isEligibleTest_rFlagOff()
DUnsupportedUxTest.java43 @Mock private UxStatesManager mUxStatesManager; field in UnsupportedUxTest
69 doReturn(false).when(mUxStatesManager).getFlag(KEY_ADSERVICES_ENABLED); in isEligibleTest_uiKillSwitchOn()
71 assertThat(mUnsupportedUx.isEligible(mConsentManager, mUxStatesManager)).isTrue(); in isEligibleTest_uiKillSwitchOn()
78 assertThat(mUnsupportedUx.isEligible(mConsentManager, mUxStatesManager)).isTrue(); in isEligibleTest_adultUserWithGaFlagOff()
/packages/modules/AdServices/adservices/tests/unittest/ui/src/com/android/adservices/service/ui/enrollment/
DAlreadyEnrolledChannelTest.java47 @Mock private UxStatesManager mUxStatesManager; field in AlreadyEnrolledChannelTest
64 mUxStatesManager)) in isEligibleTest_gaUxGaNotificationAlreadyDisplayed()
75 mUxStatesManager)) in isEligibleTest_gaUxGaNotificationNotDisplayed()
87 mUxStatesManager)) in isEligibleTest_betaUxNotificationAlreadyDisplayed()
99 mUxStatesManager)) in isEligibleTest_betaUxNotificationNotDisplayed()
111 mUxStatesManager)) in isEligibleTest_u18UxNotificationAlreadyDisplayed()
125 mUxStatesManager)) in isEligibleTest_alreadyInteractedFlagOff()
131 doReturn(true).when(mUxStatesManager).getFlag(KEY_CONSENT_ALREADY_INTERACTED_FIX_ENABLE); in isEligibleTest_alreadyInteracted()
140 mUxStatesManager)) in isEligibleTest_alreadyInteracted()
151 mUxStatesManager)) in isEligibleTest_u18UxNotificationNotDisplayed()
DPasReconsentNotificationChannelTest.java61 @Mock private UxStatesManager mUxStatesManager; field in PasReconsentNotificationChannelTest
86 doReturn(true).when(mUxStatesManager).getFlag(KEY_PAS_UX_ENABLED); in setup()
108 mUxStatesManager)) in isEligibleTest_pasNotificationAlreadyDisplayed()
127 mUxStatesManager)) in isEligibleTest_NoManualInteraction_consentRevoked_pas()
147 mUxStatesManager)) in isEligibleTest_hasManualInteraction_consentRevoked_pas()
165 mUxStatesManager)) in isEligibleTest_consentGiven_pas()
175 doReturn(true).when(mUxStatesManager).getFlag(KEY_RVC_POST_OTA_NOTIFICATION_ENABLED); in isEligibleTest_adultRvcUser_ConsentRevoked_pas()
185 mUxStatesManager)) in isEligibleTest_adultRvcUser_ConsentRevoked_pas()
195 doReturn(true).when(mUxStatesManager).getFlag(KEY_RVC_POST_OTA_NOTIFICATION_ENABLED); in isEligibleTest_adultRvcUser_ConsentGiven_pas()
205 mUxStatesManager)) in isEligibleTest_adultRvcUser_ConsentGiven_pas()
DU18DetentionChannelTest.java54 @Mock private UxStatesManager mUxStatesManager; field in U18DetentionChannelTest
76 doReturn(true).when(mUxStatesManager).getFlag(KEY_IS_U18_UX_DETENTION_CHANNEL_ENABLED); in setup()
90 doReturn(false).when(mUxStatesManager).getFlag(KEY_IS_U18_UX_DETENTION_CHANNEL_ENABLED); in isEligibleTest_U18UxDetentionChannelDisabled()
96 mUxStatesManager)) in isEligibleTest_U18UxDetentionChannelDisabled()
108 mUxStatesManager)) in isEligibleTest_detainedGaUser()
120 mUxStatesManager)) in isEligibleTest_detainedBetaUser()
132 mUxStatesManager)) in isEligibleTest_nonU18User()
144 mUxStatesManager)) in isEligibleTest_nonBetUxCheck()
DConsentNotificationResetChannelTest.java54 private UxStatesManager mUxStatesManager; field in ConsentNotificationResetChannelTest
97 mUxStatesManager)) in isEligibleTest_emptyToken()
104 doReturn(mSharedPreferences).when(mUxStatesManager).getUxSharedPreferences(); in isEligibleTest_newTokenWriteSucceeded()
113 mUxStatesManager)) in isEligibleTest_newTokenWriteSucceeded()
120 doReturn(mSharedPreferences).when(mUxStatesManager).getUxSharedPreferences(); in isEligibleTest_newTokenWriteFailed()
129 mUxStatesManager)) in isEligibleTest_newTokenWriteFailed()
137 doReturn(mSharedPreferences).when(mUxStatesManager).getUxSharedPreferences(); in isEligibleTest_sameToken()
148 mUxStatesManager)) in isEligibleTest_sameToken()
DReconsentNotificationChannelTest.java59 @Mock private UxStatesManager mUxStatesManager; field in ReconsentNotificationChannelTest
100 mPrivacySandboxUxCollection, mConsentManager, mUxStatesManager)) in isEligibleTest_nonBetaUser()
115 mPrivacySandboxUxCollection, mConsentManager, mUxStatesManager)) in isEligibleTest_nonManualOptOutBetaUser()
130 mPrivacySandboxUxCollection, mConsentManager, mUxStatesManager)) in isEligibleTest_manualOptOutBetaUser()
143 mPrivacySandboxUxCollection, mConsentManager, mUxStatesManager)) in isEligibleTest_unknownOptOutBetaUser()
158 mPrivacySandboxUxCollection, mConsentManager, mUxStatesManager)) in isEligibleTest_nonManualOptInBetaUser()
173 mPrivacySandboxUxCollection, mConsentManager, mUxStatesManager)) in isEligibleTest_manualOptInBetaUser()
186 mPrivacySandboxUxCollection, mConsentManager, mUxStatesManager)) in isEligibleTest_unknownOptInBetaUser()
DPasFirstConsentNotificationChannelTest.java53 @Mock private UxStatesManager mUxStatesManager; field in PasFirstConsentNotificationChannelTest
76 doReturn(true).when(mUxStatesManager).getFlag(KEY_PAS_UX_ENABLED); in setup()
96 mUxStatesManager)) in isEligibleTest_pasNotificationAlreadyDisplayed()
115 mUxStatesManager)) in isEligibleTest_NoManualInteraction_consentRevoked_pas()
134 mUxStatesManager)) in isEligibleTest_hasManualInteraction_consentRevoked_pas()
147 mUxStatesManager)) in isEligibleTest_consentGiven_pas()
DFirstConsentNotificationChannelTest.java49 @Mock private UxStatesManager mUxStatesManager; field in FirstConsentNotificationChannelTest
70 mUxStatesManager)) in isEligibleTest_gaNotificationAlreadyDisplayed()
82 mUxStatesManager)) in isEligibleTest_betaNotificationAlreadyDisplayed()
94 mUxStatesManager)) in isEligibleTest_u18NotificationAlreadyDisplayed()
108 mUxStatesManager)) in isEligibleTest_noNotificationEverDisplayed()
DConsentNotificationDebugChannelTest.java56 @Mock private UxStatesManager mUxStatesManager; field in ConsentNotificationDebugChannelTest
90 doReturn(true).when(mUxStatesManager).getFlag(KEY_CONSENT_NOTIFICATION_DEBUG_MODE); in isEligibleTest_consentDebugModeOn()
94 mPrivacySandboxUxCollection, mConsentManager, mUxStatesManager)) in isEligibleTest_consentDebugModeOn()
100 doReturn(false).when(mUxStatesManager).getFlag(KEY_CONSENT_NOTIFICATION_DEBUG_MODE); in isEligibleTest_consentDebugModeOff()
104 mPrivacySandboxUxCollection, mConsentManager, mUxStatesManager)) in isEligibleTest_consentDebugModeOff()
DRvcPostOTAChannelTest.java56 @Mock private UxStatesManager mUxStatesManager; field in RvcPostOTAChannelTest
90 doReturn(true).when(mUxStatesManager).getFlag(KEY_RVC_POST_OTA_NOTIFICATION_ENABLED); in isEligibleTest_isRvcAdultUser()
97 mUxStatesManager)) in isEligibleTest_isRvcAdultUser()
103 doReturn(true).when(mUxStatesManager).getFlag(KEY_RVC_POST_OTA_NOTIFICATION_ENABLED); in isEligibleTest_notRvcAdultUser()
110 mUxStatesManager)) in isEligibleTest_notRvcAdultUser()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/ui/
DUxEngine.java40 private final UxStatesManager mUxStatesManager; field in UxEngine
52 mUxStatesManager = uxStatesManager; in UxEngine()
74 mUxStatesManager.persistAdServicesStates(adServicesStates); in start()
78 mUxEngineUtil.getEligibleUxCollection(mConsentManager, mUxStatesManager); in start()
82 eligibleUx, mConsentManager, mUxStatesManager); in start()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/common/
DConsentNotificationJobService.java74 private UxStatesManager mUxStatesManager; field in ConsentNotificationJobService
199 mUxStatesManager = uxStatesManager; in setUxStatesManager()
219 if (mUxStatesManager == null) { in onStartJob()
225 !mConsentManager.isAdIdEnabled() || mUxStatesManager.isEeaDevice(); in onStartJob()
229 mConsentManager.isAdIdEnabled(), mUxStatesManager.isEeaDevice(), isEeaNotification); in onStartJob()
DAdServicesCommonServiceImpl.java114 private final UxStatesManager mUxStatesManager; field in AdServicesCommonServiceImpl
132 mUxStatesManager = uxStatesManager; in AdServicesCommonServiceImpl()
167 isAdServicesEnabled &= mUxStatesManager.isEnrolledUser(mContext); in isAdServicesEnabled()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/
DConsentNotificationJobServiceTest.java100 @Mock UxStatesManager mUxStatesManager; field in ConsentNotificationJobServiceTest
133 ExtendedMockito.doReturn(mUxStatesManager).when(() -> UxStatesManager.getInstance()); in setup()
137 mConsentNotificationJobService.setUxStatesManager(mUxStatesManager); in setup()
183 Mockito.doReturn(true).when(mUxStatesManager).isEeaDevice(); in testOnStartJobAsyncUtilExecute_Reconsent_GaUxDisabled()
218 Mockito.doReturn(true).when(mUxStatesManager).isEeaDevice(); in testOnStartJobAsyncUtilExecute_ReconsentFalse()
454 Mockito.doReturn(true).when(mUxStatesManager).isEeaDevice(); in testOnStartJobAsyncUtilExecute()
532 Mockito.doReturn(true).when(mUxStatesManager).isEeaDevice(); in mockEuDevice()
DAdServicesCommonServiceImplTest.java113 @Mock private UxStatesManager mUxStatesManager; field in AdServicesCommonServiceImplTest
141 mUxStatesManager, in setup()
152 ExtendedMockito.doReturn(mUxStatesManager).when(() -> UxStatesManager.getInstance()); in setup()
177 doReturn(true).when(mUxStatesManager).isEnrolledUser(mContext); in setup()
183 doReturn(false).when(mUxStatesManager).isEnrolledUser(mContext); in isAdServiceEnabledTest_userNotEnrolledEntryPointLogicV1()
190 mUxStatesManager, in isAdServiceEnabledTest_userNotEnrolledEntryPointLogicV1()
204 doReturn(false).when(mUxStatesManager).isEnrolledUser(mContext); in isAdServiceEnabledTest_userNotEnrolledEntryPointLogicV2()
213 mUxStatesManager, in isAdServiceEnabledTest_userNotEnrolledEntryPointLogicV2()
230 mUxStatesManager, in getAdserviceStatusTest()
256 mUxStatesManager, in getAdserviceStatusWithCheckActivityTest()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/download/
DMobileDataDownloadTest.java175 @Mock UxStatesManager mUxStatesManager; field in MobileDataDownloadTest
195 doReturn(mUxStatesManager).when(() -> UxStatesManager.getInstance()); in setUp()
581 doReturn(PrivacySandboxUxCollection.U18_UX).when(mUxStatesManager).getUx(); in topicsDownloadTest_U18UxEnabled()