From afa77e947d7b286c29cd6fc590b88d6cb425334f Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Fri, 15 May 2015 12:04:03 -0700 Subject: Don't try and trim null strings. Bug: 21161481 --- src/com/android/launcher3/Utilities.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/com') diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java index f3435fc5c..6734fdc0d 100644 --- a/src/com/android/launcher3/Utilities.java +++ b/src/com/android/launcher3/Utilities.java @@ -627,6 +627,10 @@ public final class Utilities { * Non-breaking whitespaces are also removed. */ public static String trim(CharSequence s) { + if (s == null) { + return null; + } + // Just strip any sequence of whitespace or java space characters from the beginning and end Matcher m = sTrimPattern.matcher(s); return m.replaceAll("$1"); -- cgit v1.2.3