bindDeviceAdminService requires service to be proected by BIND_DEVICE_ADMIN
Test: cts-tradefed cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest
Fix: 37624960
Change-Id: I0df88d2a019a0c5f8f997db1efede35a20441fa8
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 7855b92..51deb87 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -7826,7 +7826,8 @@
* See {@link #getBindDeviceAdminTargetUsers} for a definition of which
* device/profile owners are allowed to bind to services of another profile/device owner.
* <p>
- * The service must be unexported. Note that the {@link Context} used to obtain this
+ * The service must be protected by {@link android.Manifest.permission#BIND_DEVICE_ADMIN}.
+ * Note that the {@link Context} used to obtain this
* {@link DevicePolicyManager} instance via {@link Context#getSystemService(Class)} will be used
* to bind to the {@link android.app.Service}.
*