DevicePolicyManager: annotate SystemApi

Bug: 144953704
Test: Build

Change-Id: Iad4cf38587e54337e3687dbc87ca24ca0c41dfd2
This commit is contained in:
Chen Chen
2019-12-13 15:20:33 -08:00
parent 8d02aac547
commit ddefeb1240
2 changed files with 4 additions and 1 deletions

View File

@@ -680,6 +680,7 @@ package android.app {
package android.app.admin {
public class DevicePolicyManager {
method @RequiresPermission(android.Manifest.permission.INTERACT_ACROSS_USERS) public boolean getBluetoothContactSharingDisabled(@NonNull android.os.UserHandle);
method @Nullable @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public String getDeviceOwner();
method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public android.content.ComponentName getDeviceOwnerComponentOnAnyUser();
method @RequiresPermission(android.Manifest.permission.MANAGE_USERS) public String getDeviceOwnerNameOnAnyUser();

View File

@@ -6993,7 +6993,9 @@ public class DevicePolicyManager {
* @param userHandle The user for whom to check the caller-id permission
* @hide
*/
public boolean getBluetoothContactSharingDisabled(UserHandle userHandle) {
@SystemApi
@RequiresPermission(permission.INTERACT_ACROSS_USERS)
public boolean getBluetoothContactSharingDisabled(@NonNull UserHandle userHandle) {
if (mService != null) {
try {
return mService.getBluetoothContactSharingDisabledForUser(userHandle