diff options
author | Cary Clark <cary@android.com> | 2011-02-16 11:22:42 -0500 |
---|---|---|
committer | Cary Clark <cary@android.com> | 2011-02-16 11:22:42 -0500 |
commit | ba86052c20067be2bdb1692b070f4bb8537ecb02 (patch) | |
tree | 9e15e53a5744b805872ab06b6cf7cc5746f2fa55 | |
parent | 96683f7cb9e1f64de174e47e30ac09823193070e (diff) | |
download | packages_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.java | 6 |
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; |