Bug 1282289 - Crash when using Android add-on/HelperApps. r=nalexander
MozReview-Commit-ID: 9mBC1u9RCEE
--- a/mobile/android/base/java/org/mozilla/gecko/IntentHelper.java
+++ b/mobile/android/base/java/org/mozilla/gecko/IntentHelper.java
@@ -582,32 +582,25 @@ public final class IntentHelper implemen
public ResultHandler(JSONObject message) {
this.message = message;
}
@Override
public void onActivityResult(int resultCode, Intent data) {
JSONObject response = new JSONObject();
-
try {
if (data != null) {
if (data.getExtras() != null) {
response.put("extras", JSONUtils.bundleToJSON(data.getExtras()));
- } else {
- response.put("extras", null);
}
if (data.getData() != null) {
response.put("uri", data.getData().toString());
- } else {
- response.put("uri", null);
}
}
-
response.put("resultCode", resultCode);
} catch (JSONException e) {
Log.w(LOGTAG, "Error building JSON response.", e);
}
-
EventDispatcher.sendResponse(message, response);
}
}
}