Merge "Highlight the first result for search." into ics-mr1

This commit is contained in:
Mindy Pereira 2011-11-14 21:52:37 -08:00 committed by Android (Google) Code Review
commit 8b30d335c1

View File

@ -1320,6 +1320,13 @@ public class MessageListFragment extends ListFragment
mIsRefreshable = cursor.mIsRefreshable; mIsRefreshable = cursor.mIsRefreshable;
mCountTotalAccounts = cursor.mCountTotalAccounts; mCountTotalAccounts = cursor.mCountTotalAccounts;
// If this is a search result, open the first message.
if (UiUtilities.useTwoPane(getActivity()) && mIsFirstLoad && mListContext.isSearch()
&& cursor.getCount() > 0) {
cursor.moveToFirst();
onMessageOpen(getMailboxId(), cursor.getLong(MessagesAdapter.COLUMN_ID));
}
// Suspend message notifications as long as we're resumed // Suspend message notifications as long as we're resumed
adjustMessageNotification(false); adjustMessageNotification(false);