Ejemplo n.º 1
0
  private int getAxsUrlParameterValue() {
    if (mContentViewCore.getUrl() == null) return ACCESSIBILITY_SCRIPT_INJECTION_UNDEFINED;

    try {
      List<NameValuePair> params = URLEncodedUtils.parse(new URI(mContentViewCore.getUrl()), null);

      for (NameValuePair param : params) {
        if ("axs".equals(param.getName())) {
          return Integer.parseInt(param.getValue());
        }
      }
    } catch (URISyntaxException ex) {
    } catch (NumberFormatException ex) {
    } catch (IllegalArgumentException ex) {
    }

    return ACCESSIBILITY_SCRIPT_INJECTION_UNDEFINED;
  }
Ejemplo n.º 2
0
 public String getUrl() {
   ContentViewCore contentView = this.getContentViewCore();
   return contentView != null ? contentView.getUrl() : "";
 }