blob: 45c01bcf255b6fc5f8740d510114d884b38df5e1 [file] [log] [blame]
Philip P. Moltmanndbf78b82018-12-04 13:44:27 -08001/*
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
17package android.permission;
18
19import android.os.RemoteCallback;
Philip P. Moltmann78689522018-12-17 20:45:40 -080020import android.os.Bundle;
Philip P. Moltmann97142e22019-01-10 17:03:42 -080021import android.os.ParcelFileDescriptor;
22import android.os.UserHandle;
Philip P. Moltmanndbf78b82018-12-04 13:44:27 -080023
24/**
Philip P. Moltmannbc054d82018-12-21 09:41:58 -080025 * Interface for system apps to communication with the permission controller.
Philip P. Moltmanndbf78b82018-12-04 13:44:27 -080026 *
27 * @hide
28 */
Philip P. Moltmannbc054d82018-12-21 09:41:58 -080029oneway interface IPermissionController {
Philip P. Moltmann78689522018-12-17 20:45:40 -080030 void revokeRuntimePermissions(in Bundle request, boolean doDryRun, int reason,
31 String callerPackageName, in RemoteCallback callback);
Philip P. Moltmann97142e22019-01-10 17:03:42 -080032 void getRuntimePermissionBackup(in UserHandle user, in ParcelFileDescriptor pipe);
Philip P. Moltmann7532c612019-01-20 09:01:19 -080033 void restoreRuntimePermissionBackup(in UserHandle user, in ParcelFileDescriptor pipe);
34 void restoreDelayedRuntimePermissionBackup(String packageName, in UserHandle user,
35 in RemoteCallback callback);
Philip P. Moltmanndbf78b82018-12-04 13:44:27 -080036 void getAppPermissions(String packageName, in RemoteCallback callback);
37 void revokeRuntimePermission(String packageName, String permissionName);
Philip P. Moltmanne1436e852019-01-31 14:22:39 -080038 void countPermissionApps(in List<String> permissionNames, int flags,
39 in RemoteCallback callback);
Joel Galenson5f63b832018-12-19 15:38:04 -080040 void getPermissionUsages(boolean countSystem, long numMillis, in RemoteCallback callback);
Philip P. Moltmann41df9f92019-02-08 13:07:57 -080041 void setRuntimePermissionGrantStateByDeviceAdmin(String callerPackageName, String packageName,
42 String permission, int grantState, in RemoteCallback callback);
Svet Ganovd8eb8b22019-04-05 18:52:08 -070043 void grantOrUpgradeDefaultRuntimePermissions(in RemoteCallback callback);
Philip P. Moltmanndbf78b82018-12-04 13:44:27 -080044}