From aae6fbb903f5546aab9175dde18dfddd3549a176 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Thu, 31 Jan 2019 16:05:58 -0800 Subject: Moving some utility methods around Change-Id: I8abca49a0dbf656212b21e0552502036a1619164 --- src/com/android/launcher3/Utilities.java | 37 -------------------------------- 1 file changed, 37 deletions(-) (limited to 'src/com/android/launcher3/Utilities.java') diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index c847120b9..60dfbb7d4 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -57,8 +57,6 @@ import com.android.launcher3.util.IntArray; import java.io.Closeable; import java.io.IOException; import java.lang.reflect.Method; -import java.util.Collection; -import java.util.HashSet; import java.util.Locale; import java.util.concurrent.Executor; import java.util.concurrent.LinkedBlockingQueue; @@ -514,46 +512,11 @@ public final class Utilities { } } - /** - * Returns true if {@param original} contains all entries defined in {@param updates} and - * have the same value. - * The comparison uses {@link Object#equals(Object)} to compare the values. - */ - public static boolean containsAll(Bundle original, Bundle updates) { - for (String key : updates.keySet()) { - Object value1 = updates.get(key); - Object value2 = original.get(key); - if (value1 == null) { - if (value2 != null) { - return false; - } - } else if (!value1.equals(value2)) { - return false; - } - } - return true; - } - - /** Returns whether the collection is null or empty. */ - public static boolean isEmpty(Collection c) { - return c == null || c.isEmpty(); - } - public static boolean isBinderSizeError(Exception e) { return e.getCause() instanceof TransactionTooLargeException || e.getCause() instanceof DeadObjectException; } - /** - * Returns a HashSet with a single element. We use this instead of Collections.singleton() - * because HashSet ensures all operations, such as remove, are supported. - */ - public static HashSet singletonHashSet(T elem) { - HashSet hashSet = new HashSet<>(1); - hashSet.add(elem); - return hashSet; - } - /** * Utility method to post a runnable on the handler, skipping the synchronization barriers. */ -- cgit v1.2.3