Bug fix in "Save to bookmarks" link of browser context menu.
It seems "Save to bookmarks" was picking up current page URL/Title
instead of the url selected by the double tap. Fixed the issue by
taking url and title value via the msg obtained via double tap.
Note: This won't support the Bookmark thumbnail as url we got
from page is not loaded in webview.
Change-Id: I000650f5355a5aeb363e67542898222f25822111
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index c4c9669..c3553d4 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -572,7 +572,17 @@
null, null, null, view.isPrivateBrowsingEnabled(), 0);
break;
case R.id.save_link_bookmark_context_menu_id:
- bookmarkCurrentPage();
+ if(title == null || title == "")
+ title = url;
+
+ Intent bookmarkIntent = new Intent(mActivity, AddBookmarkPage.class);
+ //SWE TODO: No thumbnail support for the url obtained via
+ //browser context menu as its not loaded in webview.
+ if (bookmarkIntent != null) {
+ bookmarkIntent.putExtra(BrowserContract.Bookmarks.URL, url);
+ bookmarkIntent.putExtra(BrowserContract.Bookmarks.TITLE, title);
+ mActivity.startActivity(bookmarkIntent);
+ }
break;
}
break;