• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 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.internal.pm.pkg.component;
18 
19 import android.annotation.IntDef;
20 import android.annotation.NonNull;
21 import android.content.pm.PackageInfo;
22 
23 import java.lang.annotation.Retention;
24 import java.lang.annotation.RetentionPolicy;
25 
26 /**
27  * A {@link android.R.styleable#AndroidManifestUsesPermission
28  * <uses-permission>} tag parsed from the manifest.
29  *
30  * @hide
31  */
32 //@SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
33 public interface ParsedUsesPermission {
34 
35     /**
36      * Strong assertion by a developer that they will never use this permission to derive the
37      * physical location of the device, regardless of ACCESS_FINE_LOCATION and/or
38      * ACCESS_COARSE_LOCATION being granted.
39      */
40     int FLAG_NEVER_FOR_LOCATION = PackageInfo.REQUESTED_PERMISSION_NEVER_FOR_LOCATION;
41 
42     /**
43      * @hide
44      */
45     @Retention(RetentionPolicy.SOURCE)
46     @IntDef(flag = true, prefix = { "FLAG_" }, value = {
47             FLAG_NEVER_FOR_LOCATION
48     })
49     @interface UsesPermissionFlags {}
50 
51     @NonNull
getName()52     String getName();
53 
54     @UsesPermissionFlags
getUsesPermissionFlags()55     int getUsesPermissionFlags();
56 }
57