Url bar selection handling updated
Bug: 3222647
framework has been updated to change the way tap/double tap
and long press are handled
url bar uses a custom action bar to add the share option
Change-Id: Ie75fc07fe71c9e16fc7f83deda8ecddea39b0397
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index b4699e3..75dd913 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -493,6 +493,22 @@
}
+ @Override
+ public void shareCurrentPage() {
+ shareCurrentPage(mTabControl.getCurrentTab());
+ }
+
+ private void shareCurrentPage(Tab tab) {
+ if (tab != null) {
+ tab.populatePickerData();
+ sharePage(mActivity, tab.getTitle(),
+ tab.getUrl(), tab.getFavicon(),
+ createScreenshot(tab.getWebView(),
+ getDesiredThumbnailWidth(mActivity),
+ getDesiredThumbnailHeight(mActivity)));
+ }
+ }
+
/**
* Share a page, providing the title, url, favicon, and a screenshot. Uses
* an {@link Intent} to launch the Activity chooser.
@@ -599,7 +615,7 @@
}
/**
- * resume all WebView timers using the WebView instance of the given tab
+ * resume all WebView timers using the WebView instance of the given tab
* @param tab guaranteed non-null
*/
private void resumeWebViewTimers(Tab tab) {
@@ -1581,12 +1597,7 @@
mCanChord = false;
return false;
}
- currentTab.populatePickerData();
- sharePage(mActivity, currentTab.getTitle(),
- currentTab.getUrl(), currentTab.getFavicon(),
- createScreenshot(currentTab.getWebView(),
- getDesiredThumbnailWidth(mActivity),
- getDesiredThumbnailHeight(mActivity)));
+ shareCurrentPage(currentTab);
break;
case R.id.dump_nav_menu_id: