code: private Intent createIntent(String action, Uri data, String extraData, String query,
                                                              int actionKey, String actionMsg) {
          // Now build the Intent
          Intent intent = new Intent(action);
          intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
          // We need CLEAR_TOP to avoid reusing an old task that has other activities
          // on top of the one we want. We don't want to do this in in-app search though,
          // as it can be destructive to the activity stack.
          if (data != null) {
              intent.setData(data);
          }
          intent.putExtra(SearchManager.USER_QUERY, mUserQuery);
          if (query != null) {
              intent.putExtra(SearchManager.QUERY, query);
          }
          if (extraData != null) {
              intent.putExtra(SearchManager.EXTRA_DATA_KEY, extraData);
          }
          if (mAppSearchData != null) {
              intent.putExtra(SearchManager.APP_DATA, mAppSearchData);
          }
          if (actionKey != KeyEvent.KEYCODE_UNKNOWN) {
              intent.putExtra(SearchManager.ACTION_KEY, actionKey);
              intent.putExtra(SearchManager.ACTION_MSG, actionMsg);
          }
          intent.setComponent(mSearchable.getSearchActivity());
          return intent;
      }
docs: Constructs an intent from the given information and the search dialog state.
  
  @param action Intent action.
  @param data Intent data, or <code>null</code>.
  @param extraData Data for {@link SearchManager#EXTRA_DATA_KEY} or <code>null</code>.
  @param query Intent query, or <code>null</code>.
  @param actionKey The key code of the action key that was pressed,
  or {@link KeyEvent#KEYCODE_UNKNOWN} if none.
  @param actionMsg The message for the action key that was pressed,
  or <code>null</code> if none.
  @return The intent.