src/com/android/contacts/list/ProviderStatusLoader.java
deleted100644 → 0
+0
−127
+308
−0
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
The provider status query isn't backed by the filesystem, so is usually pretty fast, but still, we occasionally get ANRs. We can't just use a loder to load it in the background, because as long as it's fast, we *do* want to wait on the UI thread, as the status is needed to decide whether we should show the "contacts unavailable" fragment. Added a singleton watcher class that keeps track of the last known provider status. start() starts wathcing the status, and stop() stops it. Once we get a provider status, getProviderStatus()/getProviderStatusData() will return the last known status, unblocked. Until we get the first status, they will block at most 1 second. If we can't get the status within this timeout, it'll just return STATUS_UPGRADING, and the people app shows "Contacts list is being updated." Bug 6337646 Change-Id: I9bc34e7d43e8e4bd5e1a11898137e8422b689582