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:
@@ -87,14 +87,6 @@ public final class DatabaseUtilsTest {
|
|||||||
assertThat(DatabaseUtils.isWorkProfile(mContext)).isTrue();
|
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
|
@Test
|
||||||
public void sendAppUsageEventData_returnsExpectedList() {
|
public void sendAppUsageEventData_returnsExpectedList() {
|
||||||
// Configures the testing AppUsageEvent data.
|
// Configures the testing AppUsageEvent data.
|
||||||
|
Reference in New Issue
Block a user