private void openForResult(final JSONObject message) throws JSONException { Intent intent = GeckoAppShell.getOpenURIIntent( activity, message.optString("url"), message.optString("mime"), message.optString("action"), message.optString("title")); intent.setClassName(message.optString("packageName"), message.optString("className")); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); final ResultHandler handler = new ResultHandler(message); try { ActivityHandlerHelper.startIntentForActivity(activity, intent, handler); } catch (SecurityException e) { Log.w(LOGTAG, "Forbidden to launch activity.", e); } }
private void openWebActivity(JSONObject message) throws JSONException { final Intent intent = WebActivityMapper.getIntentForWebActivity(message.getJSONObject("activity")); ActivityHandlerHelper.startIntentForActivity(activity, intent, new ResultHandler(message)); }