Properly use CursorStatus

Reverted all that race condition fix junk and now properly using
CursorStatus to check if the initial cursor is loaded. The key point
is that CursorStatus DOESN'T CHANGE FROM LOADING if there are more
stuff to load, but that also means if Cursor.getCount() is ever >0,
that means the cursor is loaded. So we can simply do:

isLoaded = Cursor.getCount() > 0 || !CursorStatus.isLoading(...)

This makes the logic much simpler as we now no longer depend on the UI
state variable for analytics state, and we also bypass any potential
race condition with the mLoadingViewPending.

Oh, even better, we can now essentially replace the entire logic for
isLoadingAndEmpty with mInitialCursorLoading because they mean the
exact same thing.

b/13628866

Change-Id: I7619c60cddfd118a061b531802b4ff56daea92f9
1 file changed