Replace the isWorkProfile method from the SettingsLib

Replace the isWorkProfile() in the Settings with the common method
defined in the SettingsLib to avoid duplicate code

Bug: 306329984
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.fuelgauge"
Change-Id: Ic9b18e6b80c23f9d4fc200080224daa27cbf4a4d
This commit is contained in:
ykhung
2023-11-24 11:05:29 +08:00
parent 072ccdd06a
commit 7007b11228
7 changed files with 10 additions and 24 deletions

View File

@@ -91,17 +91,6 @@ public final class DatabaseUtilsTest {
DataProcessor.sUsageStatsManager = mUsageStatsManager;
}
@Test
public void isWorkProfile_defaultValue_returnFalse() {
assertThat(DatabaseUtils.isWorkProfile(mContext)).isFalse();
}
@Test
public void isWorkProfile_withManagedUser_returnTrue() {
BatteryTestUtils.setWorkProfile(mContext);
assertThat(DatabaseUtils.isWorkProfile(mContext)).isTrue();
}
@Test
public void sendAppUsageEventData_returnsExpectedList() {
// Configures the testing AppUsageEvent data.