summaryrefslogtreecommitdiff
path: root/common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/Policy.java
diff options
context:
space:
mode:
Diffstat (limited to 'common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/Policy.java')
-rw-r--r--common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/Policy.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/Policy.java b/common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/Policy.java
index c519b7ac862..a63932d617a 100644
--- a/common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/Policy.java
+++ b/common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/Policy.java
@@ -439,11 +439,11 @@ public final class Policy {
existingAnnotations.length + 1);
newAnnotations[newAnnotations.length - 1] = ensureHasDevicePolicyManagerRoleHolder(
roleHolderUser, /* isPrimary= */ true);
- return Set.of(annotation,
+ return new HashSet<>(Arrays.asList(annotation,
new DynamicParameterizedAnnotation(
annotation.annotationType().getSimpleName() + "_DPMRH",
newAnnotations
- ));
+ )));
};
}
@@ -894,7 +894,7 @@ public final class Policy {
for (Annotation annotation : annotations) {
shadowingAnnotations.addAll(
- sReverseShadowMap.getOrDefault(annotation.annotationType(), Set.of()));
+ sReverseShadowMap.getOrDefault(annotation.annotationType(), new HashSet<>()));
}
annotations.removeIf(a -> shadowingAnnotations.contains(a.annotationType()));