Backup service APIs not available on parent profile instance

Bug: 35432611
Test:  cts-tradefed run cts-dev --module DevicePolicyManager --test  com.android.cts.devicepolicy.ManagedProfileTest#testParentProfileApiDisabled
Change-Id: Ia1621183dee17dcd183a668f1714b563f79e5b17
This commit is contained in:
Esteban Talavera
2017-02-17 09:45:24 +00:00
parent 89863ea4f6
commit 5b7f2d0858

View File

@@ -7643,6 +7643,7 @@ public class DevicePolicyManager {
* @throws SecurityException if {@code admin} is not a device owner.
*/
public void setBackupServiceEnabled(@NonNull ComponentName admin, boolean enabled) {
throwIfParentInstance("setBackupServiceEnabled");
try {
mService.setBackupServiceEnabled(admin, enabled);
} catch (RemoteException re) {
@@ -7659,6 +7660,7 @@ public class DevicePolicyManager {
* @see #setBackupServiceEnabled
*/
public boolean isBackupServiceEnabled(@NonNull ComponentName admin) {
throwIfParentInstance("isBackupServiceEnabled");
try {
return mService.isBackupServiceEnabled(admin);
} catch (RemoteException re) {