summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/BrowserBookmarksPage.java4
-rw-r--r--src/com/android/browser/BrowserHistoryPage.java3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/browser/BrowserBookmarksPage.java b/src/com/android/browser/BrowserBookmarksPage.java
index 4a3ae1f4f..88927bd3e 100644
--- a/src/com/android/browser/BrowserBookmarksPage.java
+++ b/src/com/android/browser/BrowserBookmarksPage.java
@@ -242,13 +242,13 @@ public class BrowserBookmarksPage extends Fragment implements View.OnCreateConte
// It is possible that the view has been canceled when we get to
// this point as back has a higher priority
if (mCanceled) {
- return true;
+ return false;
}
AdapterView.AdapterContextMenuInfo i =
(AdapterView.AdapterContextMenuInfo)item.getMenuInfo();
// If we have no menu info, we can't tell which item was selected.
if (i == null) {
- return true;
+ return false;
}
switch (item.getItemId()) {
diff --git a/src/com/android/browser/BrowserHistoryPage.java b/src/com/android/browser/BrowserHistoryPage.java
index 9a57946c6..3b0292dea 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();