eon't setup the search results header if there is no activity.
Down the road the conversation listcursor will be owned by the
Controller and we can completely remove the need for the convlistfragment
in OnePaneControllere
Change-Id: I2666dfe3b09019e688ea481984eea873879e7644
diff --git a/src/com/android/mail/ui/ConversationListFragment.java b/src/com/android/mail/ui/ConversationListFragment.java
index e0ad27f..e88e6b8 100644
--- a/src/com/android/mail/ui/ConversationListFragment.java
+++ b/src/com/android/mail/ui/ConversationListFragment.java
@@ -161,6 +161,9 @@
* Show the header if the current conversation list is showing search results.
*/
private void configureSearchResultHeader() {
+ if (mActivity == null) {
+ return;
+ }
// Only show the header if the context is for a search result
final Resources res = getResources();
final boolean showHeader = isSearchResult();
@@ -344,12 +347,6 @@
}
@Override
- public void onDetach() {
- mActivity.attachConversationList(null);
- super.onDetach();
- }
-
- @Override
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
// Long click is for adding conversations to a selection. Add conversation here.