Bug 989109 - return isDebuggable using new async callback; r=wesj

--HG--
extra : rebase_source : 87056e2b1af8557f7e3cb5ad893b4b4067d6be4a
This commit is contained in:
Myk Melez 2014-04-01 15:38:01 -07:00
parent cd2c8e6c5b
commit 8546a4f572
2 changed files with 6 additions and 6 deletions

View File

@ -719,7 +719,7 @@ public abstract class GeckoApp
setLocale(message.getString("locale"));
} else if (event.equals("NativeApp:IsDebuggable")) {
JSONObject ret = new JSONObject();
ret.put("isDebuggable", getIsDebuggable() ? "true" : "false");
ret.put("isDebuggable", getIsDebuggable());
EventDispatcher.sendResponse(message, ret);
} else if (event.equals("SystemUI:Visibility")) {
setSystemUiVisible(message.getBoolean("visible"));

View File

@ -67,11 +67,11 @@ let WebappRT = {
#ifdef MOZ_ANDROID_SYNTHAPKS
// If the app is in debug mode, configure and enable the remote debugger.
// sendMessageToJava can only return string values, so it returns the string
// "true" rather than boolean true if the app is in debug mode.
if (sendMessageToJava({ type: "NativeApp:IsDebuggable" }) === "true") {
this._enableRemoteDebugger(aUrl);
}
sendMessageToJava({ type: "NativeApp:IsDebuggable" }, (response) => {
if (response.isDebuggable) {
this._enableRemoteDebugger(aUrl);
}
});
#endif
this.findManifestUrlFor(aUrl, aCallback);