Esempio n. 1
1
  @Override
  public synchronized void loadUrl(String url) {
    if (url == null || url.trim().isEmpty()) {
      NinjaToast.show(context, R.string.toast_load_error);
      return;
    }

    url = BrowserUnit.queryWrapper(context, url.trim());
    if (url.startsWith(BrowserUnit.URL_SCHEME_MAIL_TO)) {
      Intent intent = IntentUnit.getEmailIntent(MailTo.parse(url));
      context.startActivity(intent);
      reload();

      return;
    } else if (url.startsWith(BrowserUnit.URL_SCHEME_INTENT)) {
      Intent intent;
      try {
        intent = Intent.parseUri(url, Intent.URI_INTENT_SCHEME);
        context.startActivity(intent);
      } catch (URISyntaxException u) {
      }

      return;
    }

    webViewClient.updateWhite(adBlock.isWhite(url));
    super.loadUrl(url);
    if (browserController != null && foreground) {
      browserController.updateBookmarks();
    }
  }
Esempio n. 2
0
 public synchronized void update(String title, String url) {
   album.setAlbumTitle(title);
   if (foreground) {
     browserController.updateBookmarks();
     browserController.updateInputBox(url);
   }
 }