DO NOT MERGE Fix race condition on views showing

The bug where conversation list is shown for a split second before the
loading view is shown seems to be caused by a strange race condition
between loadingview.setvisibility and swapcursor. What seems to be
happening is that once mLoadingViewRunnable is run, the initial
isLoadingAndEmpty check passes. However, at the same time, the new
cursor is swapped in and the listview gets data to display. That
data is displayed because the list view is positioned above the
empty view. Then loadingview.setvisibility(visible) is run, and
the loading screen is shown.

In any case, it's probably not a great idea to have these three
views in conversation_list just floating around and letting the
framelayout decide what gets shown. I changed the relevant visibility
code so that it ensures only one view is shown at once.

b/13902645

Change-Id: Idc0ff1947778282ed0e10d59210c7bbf902a27e1
(cherry picked from commit b7eb514eb67020773ba9fea7d55649021343801d)
1 file changed