1 /*
2  * Copyright (C) 2022 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 
17 package com.android.libraries.pcc.chronicle.api
18 
19 import com.android.libraries.pcc.chronicle.api.Flavor.ASI_DEBUG
20 import com.android.libraries.pcc.chronicle.api.Flavor.ASI_DOG_FOOD
21 import com.android.libraries.pcc.chronicle.api.Flavor.ASI_DROID_FOOD
22 import com.android.libraries.pcc.chronicle.api.Flavor.ASI_FISH_FOOD
23 import com.android.libraries.pcc.chronicle.api.Flavor.ASI_PROD
24 
25 /** copybara:intracomment_strip_begin
26  * AiAi external name is Android System Intelligence (ASI)
27  * Astrea external name is Private Compute Services (PCS)
28  * ODAD external name is Google Play Protect Services (GPPS)
29  * copybara:intracomment_strip_end
30  */
31 
32 /** Used in policies that should target all available ASI flavors. */
33 val ASI_ALL_FLAVORS =
34   arrayOf(
35     ASI_DEBUG,
36     ASI_FISH_FOOD,
37     ASI_DOG_FOOD,
38     ASI_DROID_FOOD,
39     ASI_PROD, // includes SYSIMG and PLAYSTORE
40   )
41 
42 /** Build flavor where this policy variant will be shipped */
43 // We don't reuse BuildGuard flavor because this set should include all PCC flavors and should be
44 // independent of ASI deps as much as possible.
45 enum class Flavor {
46   /** [ASI_DEBUG] includes TESTONLY */
47   ASI_DEBUG,
48   ASI_FISH_FOOD,
49   ASI_DOG_FOOD,
50   ASI_DROID_FOOD,
51   /** [ASI_PROD] includes SYSIMG and PLAYSTORE */
52   ASI_PROD,
53   /** For local development on real devices. GPPS adjusts policy parameters during dev, so it
54    * is useful for them to have a distinct policy from integration testing. */
55   GPPS_DEBUG,
56   /** For usage in integration tests, not used on real devices. */
57   GPPS_INTEGRATION_TEST_ONLY,
58   /** Fish food also known as Team food for GPPS */
59   GPPS_FISH_FOOD,
60   GPPS_PROD,
61   PCS_INTERNAL,
62 }
63