Revert "Create cts test for enabling/disabling backup on work profile."

This reverts commit 7a94e257c39f67f7c61d23e6ea50078bdc0e20ae.

Reason for revert: b/123237328

Change-Id: Ic1fdfe5e8e384d284318fa8df271aa1f64e33b17
(cherry picked from commit 8ed62f56415387ca4671068ffd2d08dfbc27d43e)
diff --git a/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/BackupServicePoliciesTest.java b/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/BackupServicePoliciesTest.java
deleted file mode 100644
index 573f041..0000000
--- a/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/BackupServicePoliciesTest.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package com.android.cts.profileowner;
-
-public class BackupServicePoliciesTest extends BaseProfileOwnerTest {
-  /**
-   * Test: Test enabling and disabling backup service. This test should be executed after installing
-   * a profile owner so that we check that backup service is not enabled by default.
-   */
-  public void testEnablingAndDisablingBackupService() {
-    assertFalse(mDevicePolicyManager.isBackupServiceEnabled(getWho()));
-    mDevicePolicyManager.setBackupServiceEnabled(getWho(), true);
-    assertTrue(mDevicePolicyManager.isBackupServiceEnabled(getWho()));
-    mDevicePolicyManager.setBackupServiceEnabled(getWho(), false);
-    assertFalse(mDevicePolicyManager.isBackupServiceEnabled(getWho()));
-  }
-}
diff --git a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ProfileOwnerTest.java b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ProfileOwnerTest.java
index 0b5cdef..befb47c 100644
--- a/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ProfileOwnerTest.java
+++ b/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ProfileOwnerTest.java
@@ -21,7 +21,6 @@
 public class ProfileOwnerTest extends BaseDevicePolicyTest {
     private static final String PROFILE_OWNER_PKG = "com.android.cts.profileowner";
     private static final String PROFILE_OWNER_APK = "CtsProfileOwnerApp.apk";
-    private static final String FEATURE_BACKUP = "android.software.backup";
 
     private static final String ADMIN_RECEIVER_TEST_CLASS =
             PROFILE_OWNER_PKG + ".BaseProfileOwnerTest$BasicAdminReceiver";
@@ -75,15 +74,6 @@
         executeProfileOwnerTest("AppUsageObserverTest");
     }
 
-    public void testBackupServiceEnabling() throws Exception {
-        final boolean hasBackupService = getDevice().hasFeature(FEATURE_BACKUP);
-        // The backup service cannot be enabled if the backup feature is not supported.
-        if (!mHasFeature || !hasBackupService) {
-            return;
-        }
-        executeProfileOwnerTest("BackupServicePoliciesTest");
-    }
-
     @Override
     protected void tearDown() throws Exception {
         if (mHasFeature) {
diff --git a/tests/admin/src/android/admin/cts/DevicePolicyManagerTest.java b/tests/admin/src/android/admin/cts/DevicePolicyManagerTest.java
index 8fc446d..ad1fd91 100644
--- a/tests/admin/src/android/admin/cts/DevicePolicyManagerTest.java
+++ b/tests/admin/src/android/admin/cts/DevicePolicyManagerTest.java
@@ -840,7 +840,7 @@
             mDevicePolicyManager.setBackupServiceEnabled(mComponent, false);
             fail("did not throw expected SecurityException");
         } catch (SecurityException e) {
-            assertProfileOwnerMessage(e.getMessage());
+            assertDeviceOwnerMessage(e.getMessage());
         }
     }
 
@@ -853,7 +853,7 @@
             mDevicePolicyManager.isBackupServiceEnabled(mComponent);
             fail("did not throw expected SecurityException");
         } catch (SecurityException e) {
-            assertProfileOwnerMessage(e.getMessage());
+            assertDeviceOwnerMessage(e.getMessage());
         }
     }