Handle a possible weird case for empty directories table

Usually ContactsProvider must have at least one directory
in its directories table. If it does not, Contacts app works
wrongly with search UI, which is not appropriate for production.

We still need to figure out when and why it "may" happen, so
this change will dump really nasty error log when it happened.

Also modifies its comment. It looks this method does not
maintain the cursor, and should not (as this method is called
from other methods which want to maintain it)

Bug: 4970089
Change-Id: Ieaca11bfabf8413bb3f8c9867d304a5c00b5735b
1 file changed