Loading services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -856,7 +856,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { private static final String ENABLE_DEVICE_POLICY_ENGINE_FOR_FINANCE_FLAG = private static final String ENABLE_DEVICE_POLICY_ENGINE_FOR_FINANCE_FLAG = "enable_device_policy_engine"; "enable_device_policy_engine"; private static final boolean DEFAULT_ENABLE_DEVICE_POLICY_ENGINE_FOR_FINANCE_FLAG = false; private static final boolean DEFAULT_ENABLE_DEVICE_POLICY_ENGINE_FOR_FINANCE_FLAG = true; // TODO(b/265683382) remove the flag after rollout. // TODO(b/265683382) remove the flag after rollout. private static final String KEEP_PROFILES_RUNNING_FLAG = "enable_keep_profiles_running"; private static final String KEEP_PROFILES_RUNNING_FLAG = "enable_keep_profiles_running"; services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceMigrationTest.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -86,6 +86,7 @@ public class DevicePolicyManagerServiceMigrationTest extends DpmTestBase { // Test setting default restrictions for managed profile. // Test setting default restrictions for managed profile. @Test @Test @Ignore("b/277916462") public void testMigration_managedProfileOwner() throws Exception { public void testMigration_managedProfileOwner() throws Exception { // Create a managed profile user. // Create a managed profile user. final File user10dir = getServices().addUser(10, 0, final File user10dir = getServices().addUser(10, 0, Loading services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java +14 −0 Original line number Original line Diff line number Diff line Loading @@ -1368,6 +1368,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testClearDeviceOwner() throws Exception { public void testClearDeviceOwner() throws Exception { mContext.callerPermissions.add(permission.MANAGE_DEVICE_ADMINS); mContext.callerPermissions.add(permission.MANAGE_DEVICE_ADMINS); mContext.callerPermissions.add(permission.MANAGE_USERS); mContext.callerPermissions.add(permission.MANAGE_USERS); Loading Loading @@ -1955,6 +1956,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testSetUserRestriction_asDo() throws Exception { public void testSetUserRestriction_asDo() throws Exception { mContext.callerPermissions.add(permission.MANAGE_DEVICE_ADMINS); mContext.callerPermissions.add(permission.MANAGE_DEVICE_ADMINS); mContext.callerPermissions.add(permission.MANAGE_USERS); mContext.callerPermissions.add(permission.MANAGE_USERS); Loading Loading @@ -2123,6 +2125,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testSetUserRestriction_asPo() { public void testSetUserRestriction_asPo() { setAsProfileOwner(admin1); setAsProfileOwner(admin1); Loading Loading @@ -2259,6 +2262,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { ); ); @Test @Test @Ignore("b/277916462") public void testSetUserRestriction_asPoOfOrgOwnedDevice() throws Exception { public void testSetUserRestriction_asPoOfOrgOwnedDevice() throws Exception { final int MANAGED_PROFILE_ADMIN_UID = final int MANAGED_PROFILE_ADMIN_UID = UserHandle.getUid(CALLER_USER_HANDLE, DpmMockContext.SYSTEM_UID); UserHandle.getUid(CALLER_USER_HANDLE, DpmMockContext.SYSTEM_UID); Loading Loading @@ -2334,6 +2338,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testNoDefaultEnabledUserRestrictions() throws Exception { public void testNoDefaultEnabledUserRestrictions() throws Exception { mContext.callerPermissions.add(permission.MANAGE_DEVICE_ADMINS); mContext.callerPermissions.add(permission.MANAGE_DEVICE_ADMINS); mContext.callerPermissions.add(permission.MANAGE_USERS); mContext.callerPermissions.add(permission.MANAGE_USERS); Loading Loading @@ -2925,6 +2930,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testCreateAdminSupportIntent() throws Exception { public void testCreateAdminSupportIntent() throws Exception { // Setup device owner. // Setup device owner. mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID; mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID; Loading Loading @@ -4993,6 +4999,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testWipeDataManagedProfileOnOrganizationOwnedDevice() throws Exception { public void testWipeDataManagedProfileOnOrganizationOwnedDevice() throws Exception { setupProfileOwner(); setupProfileOwner(); configureProfileOwnerOfOrgOwnedDevice(admin1, CALLER_USER_HANDLE); configureProfileOwnerOfOrgOwnedDevice(admin1, CALLER_USER_HANDLE); Loading Loading @@ -7023,6 +7030,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testSetUserControlDisabledPackages_asDO() throws Exception { public void testSetUserControlDisabledPackages_asDO() throws Exception { final List<String> testPackages = new ArrayList<>(); final List<String> testPackages = new ArrayList<>(); testPackages.add("package_1"); testPackages.add("package_1"); Loading @@ -7038,6 +7046,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testSetUserControlDisabledPackages_asPO() { public void testSetUserControlDisabledPackages_asPO() { final List<String> testPackages = new ArrayList<>(); final List<String> testPackages = new ArrayList<>(); testPackages.add("package_1"); testPackages.add("package_1"); Loading Loading @@ -7776,6 +7785,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testSetUserRestriction_financeDo_validRestrictions_setsRestriction() public void testSetUserRestriction_financeDo_validRestrictions_setsRestriction() throws Exception { throws Exception { setDeviceOwner(); setDeviceOwner(); Loading Loading @@ -7858,6 +7868,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testSetUninstallBlocked_financeDo_success() throws Exception { public void testSetUninstallBlocked_financeDo_success() throws Exception { String packageName = "com.android.foo.package"; String packageName = "com.android.foo.package"; setDeviceOwner(); setDeviceOwner(); Loading @@ -7871,6 +7882,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testSetUserControlDisabledPackages_financeDo_success() throws Exception { public void testSetUserControlDisabledPackages_financeDo_success() throws Exception { List<String> packages = new ArrayList<>(); List<String> packages = new ArrayList<>(); packages.add("com.android.foo.package"); packages.add("com.android.foo.package"); Loading Loading @@ -7960,6 +7972,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testAddPersistentPreferredActivity_financeDo_success() throws Exception { public void testAddPersistentPreferredActivity_financeDo_success() throws Exception { IntentFilter filter = new IntentFilter(); IntentFilter filter = new IntentFilter(); ComponentName target = new ComponentName(admin2.getPackageName(), "test.class"); ComponentName target = new ComponentName(admin2.getPackageName(), "test.class"); Loading @@ -7975,6 +7988,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testClearPackagePersistentPreferredActvities_financeDo_success() throws Exception { public void testClearPackagePersistentPreferredActvities_financeDo_success() throws Exception { String packageName = admin2.getPackageName(); String packageName = admin2.getPackageName(); setDeviceOwner(); setDeviceOwner(); Loading Loading
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -856,7 +856,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub { private static final String ENABLE_DEVICE_POLICY_ENGINE_FOR_FINANCE_FLAG = private static final String ENABLE_DEVICE_POLICY_ENGINE_FOR_FINANCE_FLAG = "enable_device_policy_engine"; "enable_device_policy_engine"; private static final boolean DEFAULT_ENABLE_DEVICE_POLICY_ENGINE_FOR_FINANCE_FLAG = false; private static final boolean DEFAULT_ENABLE_DEVICE_POLICY_ENGINE_FOR_FINANCE_FLAG = true; // TODO(b/265683382) remove the flag after rollout. // TODO(b/265683382) remove the flag after rollout. private static final String KEEP_PROFILES_RUNNING_FLAG = "enable_keep_profiles_running"; private static final String KEEP_PROFILES_RUNNING_FLAG = "enable_keep_profiles_running";
services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerServiceMigrationTest.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -86,6 +86,7 @@ public class DevicePolicyManagerServiceMigrationTest extends DpmTestBase { // Test setting default restrictions for managed profile. // Test setting default restrictions for managed profile. @Test @Test @Ignore("b/277916462") public void testMigration_managedProfileOwner() throws Exception { public void testMigration_managedProfileOwner() throws Exception { // Create a managed profile user. // Create a managed profile user. final File user10dir = getServices().addUser(10, 0, final File user10dir = getServices().addUser(10, 0, Loading
services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java +14 −0 Original line number Original line Diff line number Diff line Loading @@ -1368,6 +1368,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testClearDeviceOwner() throws Exception { public void testClearDeviceOwner() throws Exception { mContext.callerPermissions.add(permission.MANAGE_DEVICE_ADMINS); mContext.callerPermissions.add(permission.MANAGE_DEVICE_ADMINS); mContext.callerPermissions.add(permission.MANAGE_USERS); mContext.callerPermissions.add(permission.MANAGE_USERS); Loading Loading @@ -1955,6 +1956,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testSetUserRestriction_asDo() throws Exception { public void testSetUserRestriction_asDo() throws Exception { mContext.callerPermissions.add(permission.MANAGE_DEVICE_ADMINS); mContext.callerPermissions.add(permission.MANAGE_DEVICE_ADMINS); mContext.callerPermissions.add(permission.MANAGE_USERS); mContext.callerPermissions.add(permission.MANAGE_USERS); Loading Loading @@ -2123,6 +2125,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testSetUserRestriction_asPo() { public void testSetUserRestriction_asPo() { setAsProfileOwner(admin1); setAsProfileOwner(admin1); Loading Loading @@ -2259,6 +2262,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { ); ); @Test @Test @Ignore("b/277916462") public void testSetUserRestriction_asPoOfOrgOwnedDevice() throws Exception { public void testSetUserRestriction_asPoOfOrgOwnedDevice() throws Exception { final int MANAGED_PROFILE_ADMIN_UID = final int MANAGED_PROFILE_ADMIN_UID = UserHandle.getUid(CALLER_USER_HANDLE, DpmMockContext.SYSTEM_UID); UserHandle.getUid(CALLER_USER_HANDLE, DpmMockContext.SYSTEM_UID); Loading Loading @@ -2334,6 +2338,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testNoDefaultEnabledUserRestrictions() throws Exception { public void testNoDefaultEnabledUserRestrictions() throws Exception { mContext.callerPermissions.add(permission.MANAGE_DEVICE_ADMINS); mContext.callerPermissions.add(permission.MANAGE_DEVICE_ADMINS); mContext.callerPermissions.add(permission.MANAGE_USERS); mContext.callerPermissions.add(permission.MANAGE_USERS); Loading Loading @@ -2925,6 +2930,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testCreateAdminSupportIntent() throws Exception { public void testCreateAdminSupportIntent() throws Exception { // Setup device owner. // Setup device owner. mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID; mContext.binder.callingUid = DpmMockContext.CALLER_SYSTEM_USER_UID; Loading Loading @@ -4993,6 +4999,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testWipeDataManagedProfileOnOrganizationOwnedDevice() throws Exception { public void testWipeDataManagedProfileOnOrganizationOwnedDevice() throws Exception { setupProfileOwner(); setupProfileOwner(); configureProfileOwnerOfOrgOwnedDevice(admin1, CALLER_USER_HANDLE); configureProfileOwnerOfOrgOwnedDevice(admin1, CALLER_USER_HANDLE); Loading Loading @@ -7023,6 +7030,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testSetUserControlDisabledPackages_asDO() throws Exception { public void testSetUserControlDisabledPackages_asDO() throws Exception { final List<String> testPackages = new ArrayList<>(); final List<String> testPackages = new ArrayList<>(); testPackages.add("package_1"); testPackages.add("package_1"); Loading @@ -7038,6 +7046,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testSetUserControlDisabledPackages_asPO() { public void testSetUserControlDisabledPackages_asPO() { final List<String> testPackages = new ArrayList<>(); final List<String> testPackages = new ArrayList<>(); testPackages.add("package_1"); testPackages.add("package_1"); Loading Loading @@ -7776,6 +7785,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testSetUserRestriction_financeDo_validRestrictions_setsRestriction() public void testSetUserRestriction_financeDo_validRestrictions_setsRestriction() throws Exception { throws Exception { setDeviceOwner(); setDeviceOwner(); Loading Loading @@ -7858,6 +7868,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testSetUninstallBlocked_financeDo_success() throws Exception { public void testSetUninstallBlocked_financeDo_success() throws Exception { String packageName = "com.android.foo.package"; String packageName = "com.android.foo.package"; setDeviceOwner(); setDeviceOwner(); Loading @@ -7871,6 +7882,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testSetUserControlDisabledPackages_financeDo_success() throws Exception { public void testSetUserControlDisabledPackages_financeDo_success() throws Exception { List<String> packages = new ArrayList<>(); List<String> packages = new ArrayList<>(); packages.add("com.android.foo.package"); packages.add("com.android.foo.package"); Loading Loading @@ -7960,6 +7972,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testAddPersistentPreferredActivity_financeDo_success() throws Exception { public void testAddPersistentPreferredActivity_financeDo_success() throws Exception { IntentFilter filter = new IntentFilter(); IntentFilter filter = new IntentFilter(); ComponentName target = new ComponentName(admin2.getPackageName(), "test.class"); ComponentName target = new ComponentName(admin2.getPackageName(), "test.class"); Loading @@ -7975,6 +7988,7 @@ public class DevicePolicyManagerTest extends DpmTestBase { } } @Test @Test @Ignore("b/277916462") public void testClearPackagePersistentPreferredActvities_financeDo_success() throws Exception { public void testClearPackagePersistentPreferredActvities_financeDo_success() throws Exception { String packageName = admin2.getPackageName(); String packageName = admin2.getPackageName(); setDeviceOwner(); setDeviceOwner(); Loading