Removed isWorkProfile_withSystemUser_returnFalse test

Only the UM.isManagedProfile property should be used to determine
whether a user is a managed prfile.
There is no need to perform any additional check on top of
UM.isManagedProfile to make sure the user is a managed profile.

After removing the additional check as part of ag/21512484
DataBaseUtilsTest.isWorkProfile_withSystemUser_returnFalse test
is redundant.

Test: atest DataBaseUtilsTest -c
Bug: 270283369
Change-Id: Ic4fd7eef2ac24786e2a59db7dabc9daf4a7ce028
This commit is contained in:
Nikhil Kumar
2023-02-22 11:14:40 +00:00
parent ae2c14a039
commit c9cb8e5bcb

View File

@@ -87,14 +87,6 @@ public final class DatabaseUtilsTest {
assertThat(DatabaseUtils.isWorkProfile(mContext)).isTrue();
}
@Test
public void isWorkProfile_withSystemUser_returnFalse() {
BatteryTestUtils.setWorkProfile(mContext);
Shadows.shadowOf(mContext.getSystemService(UserManager.class)).setIsSystemUser(true);
assertThat(DatabaseUtils.isWorkProfile(mContext)).isFalse();
}
@Test
public void sendAppUsageEventData_returnsExpectedList() {
// Configures the testing AppUsageEvent data.