diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2019-01-31 16:05:58 -0800 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2019-01-31 16:07:40 -0800 |
commit | aae6fbb903f5546aab9175dde18dfddd3549a176 (patch) | |
tree | 2190c0d86841d59d8851705dfac27c0d57014345 /src/com/android/launcher3/Utilities.java | |
parent | 9018627d055e86dd8f15a6f2c9f0c1ed6bf3efe6 (diff) | |
download | android_packages_apps_Trebuchet-aae6fbb903f5546aab9175dde18dfddd3549a176.tar.gz android_packages_apps_Trebuchet-aae6fbb903f5546aab9175dde18dfddd3549a176.tar.bz2 android_packages_apps_Trebuchet-aae6fbb903f5546aab9175dde18dfddd3549a176.zip |
Moving some utility methods around
Change-Id: I8abca49a0dbf656212b21e0552502036a1619164
Diffstat (limited to 'src/com/android/launcher3/Utilities.java')
-rw-r--r-- | src/com/android/launcher3/Utilities.java | 37 |
1 files changed, 0 insertions, 37 deletions
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,47 +512,12 @@ 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 <T> HashSet<T> singletonHashSet(T elem) { - HashSet<T> hashSet = new HashSet<>(1); - hashSet.add(elem); - return hashSet; - } - - /** * Utility method to post a runnable on the handler, skipping the synchronization barriers. */ public static void postAsyncCallback(Handler handler, Runnable callback) { |