Merge "Replace listFromArray with setFromArray as return type is updated"
diff --git a/services/tests/servicestests/src/com/android/server/devicepolicy/OverlayPackagesProviderTest.java b/services/tests/servicestests/src/com/android/server/devicepolicy/OverlayPackagesProviderTest.java
index 4447fe9..939a272 100644
--- a/services/tests/servicestests/src/com/android/server/devicepolicy/OverlayPackagesProviderTest.java
+++ b/services/tests/servicestests/src/com/android/server/devicepolicy/OverlayPackagesProviderTest.java
@@ -261,7 +261,7 @@
}
private void verifyAppsAreNonRequired(String action, String... appArray) {
- assertEquals(listFromArray(appArray),
+ assertEquals(setFromArray(appArray),
mHelper.getNonRequiredApps(TEST_MDM_COMPONENT_NAME, TEST_USER_ID, action));
}
@@ -347,14 +347,7 @@
if (array == null) {
return null;
}
- return new HashSet<T>(Arrays.asList(array));
- }
-
- private <T> List<T> listFromArray(T... array) {
- if (array == null) {
- return null;
- }
- return Arrays.asList(array);
+ return new HashSet<>(Arrays.asList(array));
}
class FakePackageManager extends MockPackageManager {