summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/Utilities.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2015-05-15 12:04:03 -0700
committerWinson Chung <winsonc@google.com>2015-05-15 19:07:51 +0000
commitafa77e947d7b286c29cd6fc590b88d6cb425334f (patch)
treedd103572890fcd3840e48c5a6c012495cf34f1c4 /src/com/android/launcher3/Utilities.java
parenta214a63bfe365a0e81bc3082d56896c6df24d0b4 (diff)
downloadandroid_packages_apps_Trebuchet-afa77e947d7b286c29cd6fc590b88d6cb425334f.tar.gz
android_packages_apps_Trebuchet-afa77e947d7b286c29cd6fc590b88d6cb425334f.tar.bz2
android_packages_apps_Trebuchet-afa77e947d7b286c29cd6fc590b88d6cb425334f.zip
Don't try and trim null strings.
Bug: 21161481
Diffstat (limited to 'src/com/android/launcher3/Utilities.java')
-rw-r--r--src/com/android/launcher3/Utilities.java4
1 files changed, 4 insertions, 0 deletions
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");