Philip P. Moltmann | dbf78b8 | 2018-12-04 13:44:27 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2016 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.os.RemoteCallback; |
Philip P. Moltmann | 7868952 | 2018-12-17 20:45:40 -0800 | [diff] [blame] | 20 | import android.os.Bundle; |
Philip P. Moltmann | 97142e2 | 2019-01-10 17:03:42 -0800 | [diff] [blame] | 21 | import android.os.ParcelFileDescriptor; |
| 22 | import android.os.UserHandle; |
Philip P. Moltmann | dbf78b8 | 2018-12-04 13:44:27 -0800 | [diff] [blame] | 23 | |
| 24 | /** |
Philip P. Moltmann | bc054d8 | 2018-12-21 09:41:58 -0800 | [diff] [blame] | 25 | * Interface for system apps to communication with the permission controller. |
Philip P. Moltmann | dbf78b8 | 2018-12-04 13:44:27 -0800 | [diff] [blame] | 26 | * |
| 27 | * @hide |
| 28 | */ |
Philip P. Moltmann | bc054d8 | 2018-12-21 09:41:58 -0800 | [diff] [blame] | 29 | oneway interface IPermissionController { |
Philip P. Moltmann | 7868952 | 2018-12-17 20:45:40 -0800 | [diff] [blame] | 30 | void revokeRuntimePermissions(in Bundle request, boolean doDryRun, int reason, |
| 31 | String callerPackageName, in RemoteCallback callback); |
Philip P. Moltmann | 97142e2 | 2019-01-10 17:03:42 -0800 | [diff] [blame] | 32 | void getRuntimePermissionBackup(in UserHandle user, in ParcelFileDescriptor pipe); |
Philip P. Moltmann | dbf78b8 | 2018-12-04 13:44:27 -0800 | [diff] [blame] | 33 | void getAppPermissions(String packageName, in RemoteCallback callback); |
| 34 | void revokeRuntimePermission(String packageName, String permissionName); |
Philip P. Moltmann | 08cac8e | 2018-12-04 15:09:59 -0800 | [diff] [blame] | 35 | void countPermissionApps(in List<String> permissionNames, boolean countOnlyGranted, |
| 36 | boolean countSystem, in RemoteCallback callback); |
Joel Galenson | 5f63b83 | 2018-12-19 15:38:04 -0800 | [diff] [blame] | 37 | void getPermissionUsages(boolean countSystem, long numMillis, in RemoteCallback callback); |
Philip P. Moltmann | dbf78b8 | 2018-12-04 13:44:27 -0800 | [diff] [blame] | 38 | } |