Merge "Fix NPE for VVM Sync sms messages." into mnc-dev
diff --git a/src/com/android/phone/vvm/omtp/sms/SyncMessage.java b/src/com/android/phone/vvm/omtp/sms/SyncMessage.java
index 9a78a6d..6829981 100644
--- a/src/com/android/phone/vvm/omtp/sms/SyncMessage.java
+++ b/src/com/android/phone/vvm/omtp/sms/SyncMessage.java
@@ -71,7 +71,7 @@
* @return the number of new messages stored on the voicemail server.
*/
public int getNewMessageCount() {
- return mNewMessageCount;
+ return mNewMessageCount != null ? mNewMessageCount : 0;
}
/**
@@ -101,7 +101,7 @@
* {@link com.android.phone.vvm.omtp.OmtpConstants#NEW_MESSAGE}
*/
public int getLength() {
- return mMessageLength;
+ return mMessageLength != null ? mMessageLength : 0;
}
/**
@@ -121,6 +121,6 @@
* {@link com.android.phone.vvm.omtp.OmtpConstants#NEW_MESSAGE}
*/
public long getTimestampMillis() {
- return mMsgTimeMillis;
+ return mMsgTimeMillis != null ? mMsgTimeMillis : 0;
}
}
\ No newline at end of file