| 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; |
| 20 |
import android.os.Bundle; |
| 21 |
import android.os.ParcelFileDescriptor; |
| 22 |
import android.os.UserHandle; |
| 23 |
import android.permission.AdminPermissionControlParams; |
| 24 |
import com.android.internal.infra.AndroidFuture; |
| 25 |
|
| 26 |
/** |
| 27 |
* Interface for system apps to communication with the permission controller. |
| 28 |
* |
| 29 |
* @hide |
| 30 |
*/ |
| 31 |
oneway interface IPermissionController { |
| 32 |
void revokeRuntimePermissions(in Bundle request, boolean doDryRun, int reason, |
| 33 |
String callerPackageName, in AndroidFuture callback); |
| 34 |
void getRuntimePermissionBackup(in UserHandle user, in ParcelFileDescriptor pipe); |
| 35 |
void stageAndApplyRuntimePermissionsBackup(in UserHandle user, in ParcelFileDescriptor pipe); |
| 36 |
void applyStagedRuntimePermissionBackup(String packageName, in UserHandle user, |
| 37 |
in AndroidFuture callback); |
| 38 |
void getAppPermissions(String packageName, in AndroidFuture callback); |
| 39 |
void revokeRuntimePermission(String packageName, String permissionName); |
| 40 |
void countPermissionApps(in List<String> permissionNames, int flags, |
| 41 |
in AndroidFuture callback); |
| 42 |
void getPermissionUsages(boolean countSystem, long numMillis, in AndroidFuture callback); |
| 43 |
void setRuntimePermissionGrantStateByDeviceAdminFromParams(String callerPackageName, |
| 44 |
in AdminPermissionControlParams params, in AndroidFuture callback); |
| 45 |
void grantOrUpgradeDefaultRuntimePermissions(in AndroidFuture callback); |
| 46 |
void notifyOneTimePermissionSessionTimeout(String packageName); |
| 47 |
void updateUserSensitiveForApp(int uid, in AndroidFuture callback); |
| 48 |
void getPrivilegesDescriptionStringForProfile( |
| 49 |
in String deviceProfileName, |
| 50 |
in AndroidFuture<String> callback); |
| 51 |
void getPlatformPermissionsForGroup( |
| 52 |
in String permissionGroupName, |
| 53 |
in AndroidFuture<List<String>> callback); |
| 54 |
void getGroupOfPlatformPermission( |
| 55 |
in String permissionName, |
| 56 |
in AndroidFuture<String> callback); |
| 57 |
void getUnusedAppCount( |
| 58 |
in AndroidFuture callback); |
| 59 |
void getHibernationEligibility( |
| 60 |
in String packageName, |
| 61 |
in AndroidFuture callback); |
| 62 |
void revokeSelfPermissionsOnKill(in String packageName, in List<String> permissions, |
| 63 |
in AndroidFuture callback); |
| 64 |
} |