OSDN Git Service
(root)
/
android-x86
/
frameworks-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fdff9e
)
Fix bug 2389454 - DateTimeView can NPE if "date_format" isn't set in Settings.
author
Joe Onorato
<joeo@android.com>
Mon, 1 Feb 2010 23:14:15 +0000
(18:14 -0500)
committer
Joe Onorato
<joeo@android.com>
Mon, 1 Feb 2010 23:14:15 +0000
(18:14 -0500)
core/java/android/widget/DateTimeView.java
patch
|
blob
|
history
diff --git
a/core/java/android/widget/DateTimeView.java
b/core/java/android/widget/DateTimeView.java
index
9067e26
..
3dab9f2
100644
(file)
--- a/
core/java/android/widget/DateTimeView.java
+++ b/
core/java/android/widget/DateTimeView.java
@@
-203,7
+203,7
@@
public class DateTimeView extends TextView {
private DateFormat getDateFormat() {
String format = Settings.System.getString(getContext().getContentResolver(),
Settings.System.DATE_FORMAT);
- if ("".equals(format)) {
+ if (
format == null ||
"".equals(format)) {
return DateFormat.getDateInstance(DateFormat.SHORT);
} else {
return new SimpleDateFormat(format);