mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 762068 - Part 3: Replace optString() with null checks. r=mfinkle
--HG-- extra : rebase_source : 315799b482e1db65ea1080216a765066966662dc
This commit is contained in:
parent
ab1619d670
commit
196773f134
@ -234,8 +234,8 @@ public class AwesomeBar extends GeckoActivity implements GeckoEventListener {
|
||||
public void handleMessage(String event, JSONObject message) {
|
||||
try {
|
||||
if (event.equals("SearchEngines:Data")) {
|
||||
final String suggestEngine = message.optString("suggestEngine");
|
||||
final String suggestTemplate = message.optString("suggestTemplate");
|
||||
final String suggestEngine = message.isNull("suggestEngine") ? null : message.getString("suggestEngine");
|
||||
final String suggestTemplate = message.isNull("suggestTemplate") ? null : message.getString("suggestTemplate");
|
||||
if (suggestTemplate != null)
|
||||
mSuggestClient = new SuggestClient(GeckoApp.mAppContext, suggestTemplate, SUGGESTION_TIMEOUT, SUGGESTION_MAX);
|
||||
mAwesomeTabs.setSearchEngines(suggestEngine, message.getJSONArray("searchEngines"));
|
||||
|
Loading…
Reference in New Issue
Block a user