Fix context menu handling for Bookmarks and History
Bugs: 3125172 and 3102808
BrowserActivity was trying (and failing) to handle context menu
actions that came from fragments such as bookmarks and history.
This fixes it so that BrowserActivity no longer tries to handle
menus that it didn't create.
Change-Id: I09b5f36a0030f02de6ce09ac7588cb8c78394d39
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index 7d183f6..caaa2c2 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -1542,6 +1542,11 @@
}
public boolean onContextItemSelected(MenuItem item) {
+ // Let the History and Bookmark fragments handle menus they created.
+ if (item.getGroupId() == R.id.CONTEXT_MENU) {
+ return false;
+ }
+
// chording is not an issue with context menus, but we use the same
// options selector, so set mCanChord to true so we can access them.
mCanChord = true;