Bug 697299 - Disable preferences before Gecko is loaded (ui thread fix) [r=dougt]

This commit is contained in:
Brian Nicholson 2011-10-27 14:30:34 -07:00
parent 0d2a5ba2a2
commit 69bcbcb853

View File

@ -758,7 +758,12 @@ abstract public class GeckoApp
GeckoPreferences.refresh(jsonPrefs);
} else if (event.equals("Gecko:Ready")) {
sIsGeckoReady = true;
sMenu.findItem(R.id.preferences).setEnabled(true);
mMainHandler.post(new Runnable() {
public void run() {
if (sMenu != null)
sMenu.findItem(R.id.preferences).setEnabled(true);
}
});
}
} catch (Exception e) {
Log.i(LOG_NAME, "handleMessage throws " + e + " for message: " + event);