summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/preferences/LabPreferencesFragment.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/com/android/browser/preferences/LabPreferencesFragment.java b/src/com/android/browser/preferences/LabPreferencesFragment.java
index a06dc3e..88a9690 100644
--- a/src/com/android/browser/preferences/LabPreferencesFragment.java
+++ b/src/com/android/browser/preferences/LabPreferencesFragment.java
@@ -42,21 +42,25 @@ public class LabPreferencesFragment extends PreferenceFragment
addPreferencesFromResource(R.xml.lab_preferences);
Preference e = findPreference(BrowserSettings.PREF_QUICK_CONTROLS);
- e.setOnPreferenceChangeListener(this);
+ if (e != null) {
+ e.setOnPreferenceChangeListener(this);
+ }
useInstantPref = findPreference(BrowserSettings.PREF_USE_INSTANT);
}
@Override
public void onResume() {
super.onResume();
- useInstantPref.setEnabled(false);
+ if (useInstantPref != null) {
+ useInstantPref.setEnabled(false);
- // Enable the "use instant" preference only if the selected
- // search engine is google.
- if (mBrowserSettings.getSearchEngine() != null) {
- final String currentName = mBrowserSettings.getSearchEngine().getName();
- if (SearchEngine.GOOGLE.equals(currentName)) {
- useInstantPref.setEnabled(true);
+ // Enable the "use instant" preference only if the selected
+ // search engine is google.
+ if (mBrowserSettings.getSearchEngine() != null) {
+ final String currentName = mBrowserSettings.getSearchEngine().getName();
+ if (SearchEngine.GOOGLE.equals(currentName)) {
+ useInstantPref.setEnabled(true);
+ }
}
}
}