summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshwini Munigala <AshwiniM@codeaurora.org>2014-10-07 20:02:40 +0530
committerAshwini Munigala <AshwiniM@codeaurora.org>2014-10-07 20:04:05 +0530
commit603dc4ca8e4f612d2b3a2bd0b4bfd88cc0a0f54b (patch)
tree8b03cd132644054e6b07471e0b845b3ac307a87d
parentbe1312d1e6a190616ac60c9cb68721bcc6f6caae (diff)
downloadandroid_packages_apps_BluetoothExt-603dc4ca8e4f612d2b3a2bd0b4bfd88cc0a0f54b.tar.gz
android_packages_apps_BluetoothExt-603dc4ca8e4f612d2b3a2bd0b4bfd88cc0a0f54b.tar.bz2
android_packages_apps_BluetoothExt-603dc4ca8e4f612d2b3a2bd0b4bfd88cc0a0f54b.zip
MAPC: Fix NullPointerException for ObexTime and dateTimeformat.
Handle possible NullPointerException for simpleDateFormat from BTTestApp MAPTestActivity. Change-Id: I9bf3eff2f6f4bc688d9187c7bc7da8365ed2a954 CRs-fixed: 735064
-rw-r--r--bttestapp/src/org/codeaurora/bluetooth/bttestapp/MapTestActivity.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/bttestapp/src/org/codeaurora/bluetooth/bttestapp/MapTestActivity.java b/bttestapp/src/org/codeaurora/bluetooth/bttestapp/MapTestActivity.java
index 724fa28..8be5164 100644
--- a/bttestapp/src/org/codeaurora/bluetooth/bttestapp/MapTestActivity.java
+++ b/bttestapp/src/org/codeaurora/bluetooth/bttestapp/MapTestActivity.java
@@ -1129,9 +1129,11 @@ public class MapTestActivity extends MonkeyActivity implements GetTextDialogList
.setTextColor(msg.isPriority() ? Color.YELLOW : Color.DKGRAY);
((TextView) v.findViewById(R.id.message_row_subject)).setText(msg.getSubject());
-
- ((TextView) v.findViewById(R.id.message_row_date))
- .setText(new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(msg.getDateTime()));
+ Date dateTimeFormat = msg.getDateTime();
+ if(dateTimeFormat != null ) {
+ ((TextView) v.findViewById(R.id.message_row_date))
+ .setText(new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(dateTimeFormat));
+ }
((TextView) v.findViewById(R.id.message_row_from)).setText(msg.getSenderAddressing());
if (msg.getSenderAddressing() != null && !msg.getSenderAddressing().isEmpty()) {