summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCary Clark <cary@android.com>2011-02-16 11:22:42 -0500
committerCary Clark <cary@android.com>2011-02-16 11:22:42 -0500
commitba86052c20067be2bdb1692b070f4bb8537ecb02 (patch)
tree9e15e53a5744b805872ab06b6cf7cc5746f2fa55
parent96683f7cb9e1f64de174e47e30ac09823193070e (diff)
downloadpackages_apps_Browser-ba86052c20067be2bdb1692b070f4bb8537ecb02.zip
packages_apps_Browser-ba86052c20067be2bdb1692b070f4bb8537ecb02.tar.gz
packages_apps_Browser-ba86052c20067be2bdb1692b070f4bb8537ecb02.tar.bz2
look for null web views
This edits change 96341. bug:3447246 Change-Id: Ica15a022cdfac1b98a6ee63c6d118eb01609fccb
-rw-r--r--src/com/android/browser/Controller.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index 9561cb6..e667d67 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -1468,10 +1468,8 @@ public class Controller
newtab.setEnabled(getTabControl().canCreateNewTab());
MenuItem archive = menu.findItem(R.id.save_webarchive_menu_id);
- String url = getCurrentTopWebView().getUrl();
- archive.setVisible(!TextUtils.isEmpty(url)
- && !url.endsWith("webarchivexml"));
-
+ String url = w != null ? w.getUrl() : null;
+ archive.setVisible(url != null && !url.endsWith(".webarchivexml"));
break;
}
mCurrentMenuState = mMenuState;