diff options
author | Leon Scroggins <scroggo@google.com> | 2010-05-10 11:06:03 -0400 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2010-05-10 11:06:03 -0400 |
commit | 3e20445506307d2c8d699e1d17fb82a0cedde1d0 (patch) | |
tree | 11a9042602060fb2ba8aebbeed8b86f7dabe849c /src/com | |
parent | bff40383a6d685eb2f025a894e53d30d4bc239a1 (diff) | |
download | packages_apps_Browser-3e20445506307d2c8d699e1d17fb82a0cedde1d0.zip packages_apps_Browser-3e20445506307d2c8d699e1d17fb82a0cedde1d0.tar.gz packages_apps_Browser-3e20445506307d2c8d699e1d17fb82a0cedde1d0.tar.bz2 |
Use the text in an anchor as the subject line when sharing a link.
Bug 2652226
Change-Id: Ibebf6ee5fcb9a92bf377e5133a4249ddf5da9e18
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/browser/BrowserActivity.java | 35 |
1 files changed, 1 insertions, 34 deletions
diff --git a/src/com/android/browser/BrowserActivity.java b/src/com/android/browser/BrowserActivity.java index 8efb18a..4209a28 100644 --- a/src/com/android/browser/BrowserActivity.java +++ b/src/com/android/browser/BrowserActivity.java @@ -2213,41 +2213,8 @@ public class BrowserActivity extends Activity startActivity(intent); break; case R.id.share_link_context_menu_id: - // See if this site has been visited before - StringBuilder sb = new StringBuilder( - Browser.BookmarkColumns.URL + " = "); - DatabaseUtils.appendEscapedSQLString(sb, url); - Cursor c = mResolver.query(Browser.BOOKMARKS_URI, - Browser.HISTORY_PROJECTION, - sb.toString(), - null, + sharePage(BrowserActivity.this, title, url, null, null); - if (c.moveToFirst()) { - // The site has been visited before, so grab the - // info from the database. - Bitmap favicon = null; - Bitmap thumbnail = null; - String linkTitle = c.getString(Browser. - HISTORY_PROJECTION_TITLE_INDEX); - byte[] data = c.getBlob(Browser. - HISTORY_PROJECTION_FAVICON_INDEX); - if (data != null) { - favicon = BitmapFactory.decodeByteArray( - data, 0, data.length); - } - data = c.getBlob(Browser. - HISTORY_PROJECTION_THUMBNAIL_INDEX); - if (data != null) { - thumbnail = BitmapFactory.decodeByteArray( - data, 0, data.length); - } - sharePage(BrowserActivity.this, - linkTitle, url, favicon, thumbnail); - } else { - Browser.sendString(BrowserActivity.this, url, - getString( - R.string.choosertitle_sharevia)); - } break; case R.id.copy_link_context_menu_id: copy(url); |