Debian Codegraph @

core/java/android/permission/IPermissionManager.aidl

raw
1 /*
2 * Copyright (C) 2019 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.permission;
18
19 import android.content.AttributionSourceState;
20 import android.content.pm.ParceledListSlice;
21 import android.content.pm.PermissionGroupInfo;
22 import android.content.pm.PermissionInfo;
23 import android.content.pm.permission.SplitPermissionInfoParcelable;
24 import android.os.UserHandle;
25 import android.permission.IOnPermissionsChangeListener;
26
27 /**
28 * Interface to communicate directly with the permission manager service.
29 * @see PermissionManager
30 * @hide
31 */
32 interface IPermissionManager {
33 ParceledListSlice getAllPermissionGroups(int flags);
34
35 PermissionGroupInfo getPermissionGroupInfo(String groupName, int flags);
36
37 PermissionInfo getPermissionInfo(String permissionName, String packageName, int flags);
38
39 ParceledListSlice queryPermissionsByGroup(String groupName, int flags);
40
41 boolean addPermission(in PermissionInfo permissionInfo, boolean async);
42
43 void removePermission(String permissionName);
44
45 int getPermissionFlags(String packageName, String permissionName, int userId);
46
47 void updatePermissionFlags(String packageName, String permissionName, int flagMask,
48 int flagValues, boolean checkAdjustPolicyFlagPermission, int userId);
49
50 void updatePermissionFlagsForAllApps(int flagMask, int flagValues, int userId);
51
52 void addOnPermissionsChangeListener(in IOnPermissionsChangeListener listener);
53
54 void removeOnPermissionsChangeListener(in IOnPermissionsChangeListener listener);
55
56 List<String> getAllowlistedRestrictedPermissions(String packageName,
57 int flags, int userId);
58
59 boolean addAllowlistedRestrictedPermission(String packageName, String permissionName,
60 int flags, int userId);
61
62 boolean removeAllowlistedRestrictedPermission(String packageName, String permissionName,
63 int flags, int userId);
64
65 void grantRuntimePermission(String packageName, String permissionName, int userId);
66
67 void revokeRuntimePermission(String packageName, String permissionName, int userId,
68 String reason);
69
70 void revokePostNotificationPermissionWithoutKillForTest(String packageName, int userId);
71
72 boolean shouldShowRequestPermissionRationale(String packageName, String permissionName,
73 int userId);
74
75 boolean isPermissionRevokedByPolicy(String packageName, String permissionName, int userId);
76
77 List<SplitPermissionInfoParcelable> getSplitPermissions();
78
79 void startOneTimePermissionSession(String packageName, int userId, long timeout,
80 long revokeAfterKilledDelay, int importanceToResetTimer,
81 int importanceToKeepSessionAlive);
82
83 void stopOneTimePermissionSession(String packageName, int userId);
84
85 List<String> getAutoRevokeExemptionRequestedPackages(int userId);
86
87 List<String> getAutoRevokeExemptionGrantedPackages(int userId);
88
89 boolean setAutoRevokeExempted(String packageName, boolean exempted, int userId);
90
91 boolean isAutoRevokeExempted(String packageName, int userId);
92
93 void registerAttributionSource(in AttributionSourceState source);
94
95 boolean isRegisteredAttributionSource(in AttributionSourceState source);
96 }