OSDN Git Service

Add back the throwIfParentInstance checking in getAffiliationIds
authorTony Mak <tonymak@google.com>
Tue, 2 May 2017 12:50:18 +0000 (13:50 +0100)
committerTony Mak <tonymak@google.com>
Tue, 2 May 2017 13:42:30 +0000 (13:42 +0000)
Fix: 37887947

Test: cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.ParentProfileTest#testParentProfileApiDisabled

Change-Id: I05944c7a2447998d3ea948195fb25b09ab9735fc

core/java/android/app/admin/DevicePolicyManager.java

index 9b1b6cd..109b5bb 100644 (file)
@@ -7636,6 +7636,7 @@ public class DevicePolicyManager {
      * empty set if none have been set.
      */
     public @NonNull Set<String> getAffiliationIds(@NonNull ComponentName admin) {
+        throwIfParentInstance("getAffiliationIds");
         try {
             return new ArraySet<>(mService.getAffiliationIds(admin));
         } catch (RemoteException e) {