Bug 802130 - Move GeckoAppShell.getHandler() to ThreadUtils.getBackgroundHandler(). r=mfinkle

This commit is contained in:
Kartikaya Gupta
2013-03-15 11:52:53 +01:00
parent 20a994a858
commit db8bea500d
24 changed files with 97 additions and 87 deletions

View File

@@ -6,8 +6,9 @@
package org.mozilla.gecko;
import org.mozilla.gecko.db.BrowserDB;
import org.mozilla.gecko.util.GeckoEventListener;
import org.mozilla.gecko.sync.setup.SyncAccounts;
import org.mozilla.gecko.util.GeckoEventListener;
import org.mozilla.gecko.util.ThreadUtils;
import org.json.JSONObject;
@@ -106,7 +107,7 @@ public class Tabs implements GeckoEventListener {
};
// The listener will run on the background thread (see 2nd argument).
mAccountManager.addOnAccountsUpdatedListener(mAccountListener, GeckoAppShell.getHandler(), false);
mAccountManager.addOnAccountsUpdatedListener(mAccountListener, ThreadUtils.getBackgroundHandler(), false);
if (mContentObserver != null) {
BrowserDB.registerBookmarkObserver(getContentResolver(), mContentObserver);
@@ -449,7 +450,7 @@ public class Tabs implements GeckoEventListener {
public void refreshThumbnails() {
final ThumbnailHelper helper = ThumbnailHelper.getInstance();
GeckoAppShell.getHandler().post(new Runnable() {
ThreadUtils.postToBackgroundThread(new Runnable() {
@Override
public void run() {
for (final Tab tab : mOrder) {
@@ -553,7 +554,7 @@ public class Tabs implements GeckoEventListener {
public void persistAllTabs() {
final GeckoApp activity = getActivity();
final Iterable<Tab> tabs = getTabsInOrder();
GeckoAppShell.getHandler().post(new Runnable() {
ThreadUtils.postToBackgroundThread(new Runnable() {
@Override
public void run() {
boolean syncIsSetup = SyncAccounts.syncAccountsExist(activity);