Lines Matching refs:url
126 import java.net.URL;
483 // If the WebView has the same original url and is on that
504 // with a matching url.
512 // if FLAG_ACTIVITY_BROUGHT_TO_FRONT flag is on, the url
514 // MAX_TABS. Then the url will be opened in the current
564 String url = null;
572 if (data != null) url = data.toString();
576 url = intent.getStringExtra(SearchManager.QUERY);
578 return handleWebSearchRequest(url, intent.getBundleExtra(SearchManager.APP_DATA),
583 * Launches the default web search activity with the query parameters if the given url string
584 * was identified as plain search terms and not URL/shortcut.
590 // In general, we shouldn't modify URL from Intent.
591 // But currently, we get the user-typed URL from search box as well.
592 String url = fixUrl(inUrl).trim();
596 if (Patterns.WEB_URL.matcher(url).matches()
597 || ACCEPTED_URI_SCHEMA.matcher(url).matches()) {
602 final String newUrl = url;
613 searchEngine.startSearch(this, url, appData, extraData);
619 String url = "";
624 url = smartUrlFilter(intent.getData());
625 if (url != null && url.startsWith("content:")) {
629 url += "?" + mimeType;
632 if (url != null && url.startsWith("http")) {
647 url = intent.getStringExtra(SearchManager.QUERY);
648 if (url != null) {
649 mLastEnteredUrl = url;
650 // In general, we shouldn't modify URL from Intent.
651 // But currently, we get the user-typed URL from search box as well.
652 url = fixUrl(url);
653 url = smartUrlFilter(url);
655 final String newUrl = url;
663 if (url.contains(searchSource)) {
672 url = url.replace(searchSource, "&source=android-"+source+"&");
677 return new UrlData(url, headers, intent);
694 // FIXME: Converting the url to lower case
1062 int urlIndex = c.getColumnIndex(Browser.BookmarkColumns.URL);
1064 String url = c.getString(urlIndex);
1065 db.retainIconForPageUrl(url);
1169 String url = (getTopWindow() == null) ? null : getTopWindow().getUrl();
1170 startSearch(mSettings.getHomePage().equals(url) ? null : url, true,
1327 i.putExtra("url", w.getUrl());
1768 // that accepts url as string.
1769 private Tab openTabAndShow(String url, boolean closeOnExit, String appId) {
1770 return openTabAndShow(new UrlData(url), closeOnExit, appId);
1775 // url isn't null, it will load the given url.
1800 // Load the given url.
1807 private Tab openTab(String url) {
1812 loadUrl(view, url);
1816 return openTabAndShow(url, false, null);
1848 private URL mUrl;
1852 public SetAsWallpaper(String url) {
1854 mUrl = new URL(url);
1973 * Sets a title composed of the URL and the title string.
1974 * @param url The URL of the site being loaded.
1977 void setUrlTitle(String url, String title) {
1978 mUrl = url;
1983 mTitleBar.setDisplayTitle(url);
1984 mFakeTitleBar.setDisplayTitle(url);
1988 * @param url The URL to build a title version of the URL from.
1989 * @return The title version of the URL or null if fails.
1990 * The title version of the URL can be either the URL hostname,
1992 * or an empty string if, for example, the URL in question is a
1993 * file:// URL with no hostname.
1995 /* package */ static String buildTitleUrl(String url) {
1998 if (url != null) {
2000 // parse the url string
2001 URL urlObj = new URL(url);
2241 String url = (String) msg.getData().get("url");
2243 if (url == null || url.length() == 0) {
2255 loadUrlFromContext(getTopWindow(), url);
2259 final Tab newTab = openTab(url);
2267 intent.putExtra("url", url);
2274 Browser.BookmarkColumns.URL + " = ");
2275 DatabaseUtils.appendEscapedSQLString(sb, url);
2301 linkTitle, url, favicon, thumbnail);
2303 Browser.sendString(BrowserActivity.this, url,
2309 copy(url);
2313 onDownloadStartNoStream(url, null, null, null, -1);
2348 * Share a page, providing the title, url, favicon, and a screenshot. Uses
2353 * @param url URL of the page. Stored in the Intent with
2360 public static final void sharePage(Context c, String title, String url,
2364 send.putExtra(Intent.EXTRA_TEXT, url);
2389 final String url = view.getUrl();
2398 cr, originalUrl, url, true);
2512 void onPageStarted(WebView view, String url, Bitmap favicon) {
2519 resetLockIcon(url);
2520 setUrlTitle(url, null);
2531 WebAddress uri = new WebAddress(url);
2558 void onPageFinished(WebView view, String url) {
2598 Log.d(LOGTAG, performanceString + "\nWebpage: " + url);
2600 if (url != null) {
2601 // strip the url to maintain consistency
2602 String newUrl = new String(url);
2625 boolean shouldOverrideUrlLoading(WebView view, String url) {
2626 if (url.startsWith(SCHEME_WTAI)) {
2629 if (url.startsWith(SCHEME_WTAI_MC)) {
2632 url.substring(SCHEME_WTAI_MC.length())));
2638 if (url.startsWith(SCHEME_WTAI_SD)) {
2645 if (url.startsWith(SCHEME_WTAI_AP)) {
2653 if (url.startsWith("about:")) {
2660 intent = Intent.parseUri(url, Intent.URI_INTENT_SCHEME);
2662 Log.w("Browser", "Bad URI " + url + ": " + ex.getMessage());
2690 // ignore the error. If no application can handle the URL,
2695 openTab(url);
2826 * @param url The full url to the content that should be downloaded
2832 public void onDownloadStart(String url, String userAgent,
2842 intent.setDataAndType(Uri.parse(url), mimetype);
2848 // load the url only to try and download it again.
2861 + " over " + Uri.parse(url).getScheme(),
2870 onDownloadStartNoStream(url, userAgent, contentDisposition, mimetype, contentLength);
2874 // instead of just encoding URL's properly
2906 * @param url The full url to the content that should be downloaded
2912 /*package */ void onDownloadStartNoStream(String url, String userAgent,
2915 String filename = URLUtil.guessFileName(url,
2946 webAddress = new WebAddress(url);
2951 Log.e(LOGTAG, "Exception trying to parse url:" + url);
2955 // XXX: Have to use the old url since the cookies were stored using the
2956 // old percent-encoded url.
2957 String cookies = CookieManager.getInstance().getCookie(url);
2991 * know the url to be loaded.
2993 private void resetLockIcon(String url) {
2995 mTabControl.getCurrentTab().resetLockIcon(url);
3037 String url = null;
3041 url = tab.getUrl();
3044 // Use the cached title and url if this is the current WebView
3045 url = mUrl;
3048 url = view.getUrl();
3052 if (url == null) {
3053 url = "";
3059 ((TextView) pageInfoView.findViewById(R.id.address)).setText(url);
3565 String url = current.getUrl();
3570 if (null == url) {
3571 url = mLastEnteredUrl;
3573 if (null == url) {
3574 url = mSettings.getHomePage();
3579 title = url;
3582 intent.putExtra("url", url);
3595 private void loadUrlFromContext(WebView view, String url) {
3597 if (url != null && url.length() != 0 && view != null) {
3598 url = smartUrlFilter(url);
3599 if (!view.getWebViewClient().shouldOverrideUrlLoading(view, url)) {
3600 loadUrl(view, url);
3606 * Load the URL into the given WebView and update the title bar
3609 * @param view The WebView used to load url.
3610 * @param url The URL to load.
3612 private void loadUrl(WebView view, String url) {
3613 updateTitleBarForNewLoad(view, url);
3614 view.loadUrl(url);
3630 * loading the new URL. i.e. set its text, clear the favicon (which
3635 * @param url The URL that is being loaded.
3637 private void updateTitleBarForNewLoad(WebView view, String url) {
3639 setUrlTitle(url, null);
3661 URL or search
3667 * @return Original or modified URL
3670 String smartUrlFilter(String url) {
3672 String inUrl = url.trim();
3862 // The up-to-date URL and title (these can be different from those stored
3975 UrlData(String url) {
3976 this.mUrl = url;
3981 UrlData(String url, Map<String, String> headers, Intent intent) {
3982 this.mUrl = url;