OSDN Git Service
(root)
/
android-x86
/
packages-apps-Launcher3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a214a63
)
Don't try and trim null strings.
author
Winson Chung
<winsonc@google.com>
Fri, 15 May 2015 19:04:03 +0000
(12:04 -0700)
committer
Winson Chung
<winsonc@google.com>
Fri, 15 May 2015 19:07:51 +0000
(19:07 +0000)
Bug:
21161481
src/com/android/launcher3/Utilities.java
patch
|
blob
|
history
diff --git
a/src/com/android/launcher3/Utilities.java
b/src/com/android/launcher3/Utilities.java
index
f3435fc
..
6734fdc
100644
(file)
--- 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");