am 9198985b: am e4b32b1e: am 2a9eecc0: am 602f0e4c: Merge "Gmail crash in webview" into ub-gmail-ur14-dev
* commit '9198985b5e2c6134a08fd1067ca2a0a63870c632':
Gmail crash in webview
diff --git a/src/com/android/mail/ui/AbstractConversationViewFragment.java b/src/com/android/mail/ui/AbstractConversationViewFragment.java
index f2122f1..bf2e998 100644
--- a/src/com/android/mail/ui/AbstractConversationViewFragment.java
+++ b/src/com/android/mail/ui/AbstractConversationViewFragment.java
@@ -26,6 +26,7 @@
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
+import android.support.annotation.Nullable;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
@@ -278,7 +279,7 @@
}
@Override
- public MessageCursor getMessageCursor() {
+ public @Nullable MessageCursor getMessageCursor() {
return mCursor;
}
diff --git a/src/com/android/mail/ui/ConversationViewFragment.java b/src/com/android/mail/ui/ConversationViewFragment.java
index fec9952..3e68841 100644
--- a/src/com/android/mail/ui/ConversationViewFragment.java
+++ b/src/com/android/mail/ui/ConversationViewFragment.java
@@ -1148,8 +1148,12 @@
if (domMessageId == null) {
return null;
}
+ final MessageCursor messageCursor = getMessageCursor();
+ if (messageCursor == null) {
+ return null;
+ }
final String messageId = mTemplates.getMessageIdForDomId(domMessageId);
- return getMessageCursor().getMessageForId(Long.parseLong(messageId));
+ return messageCursor.getMessageForId(Long.parseLong(messageId));
}
/**