diff options
author | Leon Scroggins <scroggo@google.com> | 2010-11-03 18:51:46 -0400 |
---|---|---|
committer | Leon Scroggins <scroggo@google.com> | 2010-11-03 18:51:46 -0400 |
commit | c8cae086f23bd8f3d740befcdbbda9a8688cc2a3 (patch) | |
tree | 3c179bc02b4749f9bec478e45b10d0d90b25cb72 /src/com/android/browser/BrowserHistoryPage.java | |
parent | bc5d9bc751e293c3268e3847afbfb4ce591cb9d2 (diff) | |
download | packages_apps_Browser-c8cae086f23bd8f3d740befcdbbda9a8688cc2a3.zip packages_apps_Browser-c8cae086f23bd8f3d740befcdbbda9a8688cc2a3.tar.gz packages_apps_Browser-c8cae086f23bd8f3d740befcdbbda9a8688cc2a3.tar.bz2 |
Allow context menu items to be handled properly.
Bug:3130048
BrowserBookmarksPage was claiming that it handled the MenuItem,
so nothing was happening.
BrowserHistoryPage assumed that the MenuInfo would always be non-
null, and could cause a crash.
Change-Id: Iaffbf88390f2513dc6ddb35a91ae097e873d5ae2
Diffstat (limited to 'src/com/android/browser/BrowserHistoryPage.java')
-rw-r--r-- | src/com/android/browser/BrowserHistoryPage.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/com/android/browser/BrowserHistoryPage.java b/src/com/android/browser/BrowserHistoryPage.java index 9a57946..3b0292d 100644 --- a/src/com/android/browser/BrowserHistoryPage.java +++ b/src/com/android/browser/BrowserHistoryPage.java @@ -276,6 +276,9 @@ public class BrowserHistoryPage extends Fragment public boolean onContextItemSelected(MenuItem item) { ExpandableListContextMenuInfo i = (ExpandableListContextMenuInfo) item.getMenuInfo(); + if (i == null) { + return false; + } HistoryItem historyItem = (HistoryItem) i.targetView; String url = historyItem.getUrl(); String title = historyItem.getName(); |