summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chen Chen <cncn@google.com> 2019-12-13 15:20:33 -0800
committer Chen Chen <cncn@google.com> 2019-12-13 23:54:04 +0000
commitddefeb1240513dc028e316986dfa35c04cf44a1f (patch)
treeaf865c87c68f52909f1a3cec064407bd73f26e6d
parent8d02aac5470bfe120ce8d57ebd8bf4bcfa618cd5 (diff)
DevicePolicyManager: annotate SystemApi
Bug: 144953704 Test: Build Change-Id: Iad4cf38587e54337e3687dbc87ca24ca0c41dfd2
-rwxr-xr-xapi/system-current.txt1
-rw-r--r--core/java/android/app/admin/DevicePolicyManager.java4
2 files changed, 4 insertions, 1 deletions
diff --git a/api/system-current.txt b/api/system-current.txt
index 52e5255609c9..674456043cd4 100755
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -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();
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index a17b2ddd7215..fd19d0be4e26 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -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