Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c2bd6138 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

Don't load provider status on the ui thread

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
parent 9ec8a75d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment