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 a77c3b5dec
commit 0576c53df1

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);