• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2024 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package com.android.adservices.tests.ui.common;
17 
18 import static com.android.adservices.service.DebugFlagsConstants.KEY_CONSENT_NOTIFICATION_DEBUG_MODE;
19 import static com.android.adservices.service.FlagsConstants.KEY_ADSERVICES_ENABLED;
20 import static com.android.adservices.service.FlagsConstants.KEY_CONSENT_NOTIFICATION_INTERVAL_BEGIN_MS;
21 import static com.android.adservices.service.FlagsConstants.KEY_CONSENT_NOTIFICATION_INTERVAL_END_MS;
22 import static com.android.adservices.service.FlagsConstants.KEY_CONSENT_NOTIFICATION_MINIMAL_DELAY_BEFORE_INTERVAL_ENDS;
23 import static com.android.adservices.service.FlagsConstants.KEY_ENABLE_AD_SERVICES_SYSTEM_API;
24 import static com.android.adservices.service.FlagsConstants.KEY_IS_EEA_DEVICE_FEATURE_ENABLED;
25 import static com.android.adservices.service.FlagsConstants.KEY_UI_OTA_STRINGS_FEATURE_ENABLED;
26 
27 import com.android.adservices.common.AdServicesCtsTestCase;
28 import com.android.adservices.common.annotations.DisableGlobalKillSwitch;
29 import com.android.adservices.common.annotations.SetAllLogcatTags;
30 import com.android.adservices.shared.testing.annotations.DisableDebugFlag;
31 import com.android.adservices.shared.testing.annotations.SetFlagDisabled;
32 import com.android.adservices.shared.testing.annotations.SetFlagEnabled;
33 import com.android.adservices.shared.testing.annotations.SetLongFlag;
34 
35 @DisableDebugFlag(KEY_CONSENT_NOTIFICATION_DEBUG_MODE)
36 @DisableGlobalKillSwitch
37 @SetAllLogcatTags
38 @SetFlagDisabled(KEY_UI_OTA_STRINGS_FEATURE_ENABLED)
39 @SetFlagEnabled(KEY_ADSERVICES_ENABLED)
40 @SetFlagEnabled(KEY_ENABLE_AD_SERVICES_SYSTEM_API)
41 @SetFlagEnabled(KEY_IS_EEA_DEVICE_FEATURE_ENABLED)
42 @SetLongFlag(name = KEY_CONSENT_NOTIFICATION_INTERVAL_BEGIN_MS, value = 0)
43 @SetLongFlag(name = KEY_CONSENT_NOTIFICATION_INTERVAL_END_MS, value = 86400000)
44 @SetLongFlag(name = KEY_CONSENT_NOTIFICATION_MINIMAL_DELAY_BEFORE_INTERVAL_ENDS, value = 0)
45 abstract class AdServicesCommonStatesServicesTestCase extends AdServicesCtsTestCase {}
46