mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1014283 - Finish BrowserHealthRecorder initialization after distribution processing. r=margaret
This commit is contained in:
parent
f4378f0c84
commit
ae326d8e37
@ -525,16 +525,17 @@ public class BrowserHealthRecorder implements HealthRecorder, GeckoEventListener
|
||||
|
||||
// Because the distribution lookup can take some time, do it at the end of
|
||||
// our background startup work, along with the Gecko snapshot fetch.
|
||||
final GeckoEventListener self = this;
|
||||
ThreadUtils.postToBackgroundThread(new Runnable() {
|
||||
final Distribution distribution = Distribution.getInstance(context);
|
||||
distribution.addOnDistributionReadyCallback(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final DistributionDescriptor desc = new Distribution(context).getDescriptor();
|
||||
Log.d(LOG_TAG, "Running post-distribution task: health recorder.");
|
||||
final DistributionDescriptor desc = distribution.getDescriptor();
|
||||
if (desc != null && desc.valid) {
|
||||
profileCache.setDistributionString(desc.id, desc.version);
|
||||
}
|
||||
Log.d(LOG_TAG, "Requesting all add-ons and FHR prefs from Gecko.");
|
||||
dispatcher.registerGeckoThreadListener(self, EVENT_SNAPSHOT);
|
||||
dispatcher.registerGeckoThreadListener(BrowserHealthRecorder.this, EVENT_SNAPSHOT);
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("HealthReport:RequestSnapshot", null));
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user