• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 android.adservices.common;
18 
19 import android.annotation.SystemApi;
20 
21 /** Permissions used by the AdServices APIs. */
22 public class AdServicesPermissions {
AdServicesPermissions()23     private AdServicesPermissions() {}
24 
25     /** This permission needs to be declared by the caller of Topics APIs. */
26     public static final String ACCESS_ADSERVICES_TOPICS =
27             "android.permission.ACCESS_ADSERVICES_TOPICS";
28 
29     /** This permission needs to be declared by the caller of Attribution APIs. */
30     public static final String ACCESS_ADSERVICES_ATTRIBUTION =
31             "android.permission.ACCESS_ADSERVICES_ATTRIBUTION";
32 
33     /** This permission needs to be declared by the caller of Custom Audiences APIs. */
34     public static final String ACCESS_ADSERVICES_CUSTOM_AUDIENCE =
35             "android.permission.ACCESS_ADSERVICES_CUSTOM_AUDIENCE";
36 
37     /** This permission needs to be declared by the caller of Advertising ID APIs. */
38     public static final String ACCESS_ADSERVICES_AD_ID =
39             "android.permission.ACCESS_ADSERVICES_AD_ID";
40 
41     /**
42      * This is a signature permission that needs to be declared by the AdServices apk to access API
43      * for AdID provided by another provider service. The signature permission is required to make
44      * sure that only AdServices is permitted to access this api.
45      *
46      * @hide
47      */
48     @SystemApi
49     public static final String ACCESS_PRIVILEGED_AD_ID =
50             "android.permission.ACCESS_PRIVILEGED_AD_ID";
51 
52     /**
53      * This is a signature permission needs to be declared by the AdServices apk to access API for
54      * AppSetId provided by another provider service. The signature permission is required to make
55      * sure that only AdServices is permitted to access this api.
56      *
57      * @hide
58      */
59     @SystemApi
60     public static final String ACCESS_PRIVILEGED_APP_SET_ID =
61             "android.permission.ACCESS_PRIVILEGED_APP_SET_ID";
62 
63     /**
64      * The permission that lets it modify AdService's enablement state modification API.
65      *
66      * @hide
67      */
68     @SystemApi
69     public static final String MODIFY_ADSERVICES_STATE =
70             "android.permission.MODIFY_ADSERVICES_STATE";
71 
72     /**
73      * The permission that lets it access AdService's enablement state modification API.
74      *
75      * @hide
76      */
77     @SystemApi
78     public static final String ACCESS_ADSERVICES_STATE =
79             "android.permission.ACCESS_ADSERVICES_STATE";
80 
81     /**
82      * The permission needed to call AdServicesManager APIs
83      *
84      * @hide
85      */
86     public static final String ACCESS_ADSERVICES_MANAGER =
87             "android.permission.ACCESS_ADSERVICES_MANAGER";
88 }
89