Merge "Revert "Open up AndroidPackage as @SystemApi""

This commit is contained in:
Winson Chiu
2021-09-09 23:29:51 +00:00
committed by Android (Google) Code Review
63 changed files with 2019 additions and 2793 deletions

View File

@@ -891,18 +891,4 @@ public class ArrayUtils {
public static @Nullable <T> T firstOrNull(T[] items) {
return items.length > 0 ? items[0] : null;
}
/**
* Creates a {@link List} from an array. Different from {@link Arrays#asList(Object[])} as that
* will use the parameter as the backing array, meaning changes are not isolated.
*/
public static <T> List<T> toList(T[] array) {
List<T> list = new ArrayList<>(array.length);
//noinspection ManualArrayToCollectionCopy
for (T item : array) {
//noinspection UseBulkOperation
list.add(item);
}
return list;
}
}

View File

@@ -226,13 +226,6 @@ public class CollectionUtils {
return size(cur) == 0;
}
/**
* Returns whether the given map {@link Map#isEmpty is empty} or {@code null}
*/
public static boolean isEmpty(@Nullable Map<?, ?> cur) {
return size(cur) == 0;
}
/**
* Returns the elements of the given list that are of type {@code c}
*/