summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/xml-sw600dp/advanced_preferences.xml7
-rw-r--r--res/xml/advanced_preferences.xml7
-rw-r--r--res/xml/debug_preferences.xml7
-rw-r--r--src/com/android/browser/BrowserSettings.java11
4 files changed, 18 insertions, 14 deletions
diff --git a/res/xml-sw600dp/advanced_preferences.xml b/res/xml-sw600dp/advanced_preferences.xml
index 73f145b..5bda3b4 100644
--- a/res/xml-sw600dp/advanced_preferences.xml
+++ b/res/xml-sw600dp/advanced_preferences.xml
@@ -25,6 +25,13 @@
android:summary="@string/pref_content_search_engine_summary"
android:dialogTitle="@string/pref_content_search_engine" />
+ <ListPreference
+ android:key="user_agent"
+ android:title="@string/pref_development_uastring"
+ android:entries="@array/pref_development_ua_choices"
+ android:entryValues="@array/pref_development_ua_values"
+ android:defaultValue="0"/>
+
<CheckBoxPreference
android:key="open_in_background"
android:defaultValue="false"
diff --git a/res/xml/advanced_preferences.xml b/res/xml/advanced_preferences.xml
index e292b7d..b89c20a 100644
--- a/res/xml/advanced_preferences.xml
+++ b/res/xml/advanced_preferences.xml
@@ -25,6 +25,13 @@
android:summary="@string/pref_content_search_engine_summary"
android:dialogTitle="@string/pref_content_search_engine" />
+ <ListPreference
+ android:key="user_agent"
+ android:title="@string/pref_development_uastring"
+ android:entries="@array/pref_development_ua_choices"
+ android:entryValues="@array/pref_development_ua_values"
+ android:defaultValue="0"/>
+
<CheckBoxPreference
android:key="open_in_background"
android:defaultValue="false"
diff --git a/res/xml/debug_preferences.xml b/res/xml/debug_preferences.xml
index 029bc4f..07c0142 100644
--- a/res/xml/debug_preferences.xml
+++ b/res/xml/debug_preferences.xml
@@ -28,13 +28,6 @@
android:title="@string/pref_development_hardware_accel_skia"
android:enabled="false" />
- <ListPreference
- android:key="user_agent"
- android:title="@string/pref_development_uastring"
- android:entries="@array/pref_development_ua_choices"
- android:entryValues="@array/pref_development_ua_values"
- android:defaultValue="0"/>
-
<CheckBoxPreference
android:key="enable_visual_indicator"
android:defaultValue="false"
diff --git a/src/com/android/browser/BrowserSettings.java b/src/com/android/browser/BrowserSettings.java
index 586db28..8138bc2 100644
--- a/src/com/android/browser/BrowserSettings.java
+++ b/src/com/android/browser/BrowserSettings.java
@@ -612,6 +612,10 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener,
return mPrefs.getString(PREF_SEARCH_ENGINE, SearchEngine.GOOGLE);
}
+ public int getUserAgent() {
+ return Integer.parseInt(mPrefs.getString(PREF_USER_AGENT, "0"));
+ }
+
public boolean allowAppTabs() {
return mPrefs.getBoolean(PREF_ALLOW_APP_TABS, false);
}
@@ -694,13 +698,6 @@ public class BrowserSettings implements OnSharedPreferenceChangeListener,
return mPrefs.getBoolean(PREF_ENABLE_HARDWARE_ACCEL_SKIA, false);
}
- public int getUserAgent() {
- if (!isDebugEnabled()) {
- return 0;
- }
- return Integer.parseInt(mPrefs.getString(PREF_USER_AGENT, "0"));
- }
-
// -----------------------------
// getter/setters for hidden_debug_preferences.xml
// -----------------------------