diff options
author | Magnus Hallqvist <magnus.hallqvist@sonymobile.com> | 2012-08-31 13:30:39 +0200 |
---|---|---|
committer | Johan Redestig <johan.redestig@sonymobile.com> | 2012-09-13 15:44:53 +0200 |
commit | 47ed4b883a66e08240066e0bd0aa66d1571005b3 (patch) | |
tree | c2ee5f8220c62a2a3f4e6505f85efa08e6712856 /src | |
parent | d22af61d97b938d0c4124fbdaae627f3e85e7084 (diff) | |
download | packages_apps_browser-47ed4b883a66e08240066e0bd0aa66d1571005b3.zip packages_apps_browser-47ed4b883a66e08240066e0bd0aa66d1571005b3.tar.gz packages_apps_browser-47ed4b883a66e08240066e0bd0aa66d1571005b3.tar.bz2 |
BrowserSettings required a Controller sometimes
BrowserSettings can be used without a browser Controller, e.g.
when accessed from system settings. But some null checks for
this case were missing, these have now been added.
Change-Id: I57762898d34ef3018569e0de1499be2922dabded
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/browser/BrowserSettings.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java index 7d3195a..4555c18 100644 --- a/src/com/android/browser/BrowserSettings.java +++ b/src/com/android/browser/BrowserSettings.java @@ -372,11 +372,11 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener, if (PREF_SEARCH_ENGINE.equals(key)) { updateSearchEngine(false); } else if (PREF_FULLSCREEN.equals(key)) { - if (mController.getUi() != null) { + if (mController != null && mController.getUi() != null) { mController.getUi().setFullscreen(useFullscreen()); } } else if (PREF_ENABLE_QUICK_CONTROLS.equals(key)) { - if (mController.getUi() != null) { + if (mController != null && mController.getUi() != null) { mController.getUi().setUseQuickControls(sharedPreferences.getBoolean(key, false)); } } else if (PREF_LINK_PREFETCH.equals(key)) { |