Bug 888553 - Remote Debugging Part 1: Strings and prefs layout. r=lucasr
authorChenxia Liu <liuche@mozilla.com>
Wed, 31 Jul 2013 15:38:47 -0700
changeset 148411 d7d29572f9df1e01d1f324740a368984bace8923
parent 148410 c84673c64f39d97049186ed2a7ee6809e09cec36
child 148412 14fccad8c36c8762de3320a45cf03c7f131eb210
push idunknown
push userunknown
push dateunknown
reviewerslucasr
bugs888553
milestone25.0a1
Bug 888553 - Remote Debugging Part 1: Strings and prefs layout. r=lucasr
mobile/android/base/Makefile.in
mobile/android/base/locales/en-US/android_strings.dtd
mobile/android/base/resources/xml-v11/preference_headers.xml
mobile/android/base/resources/xml-v11/preferences.xml
mobile/android/base/resources/xml-v11/preferences_customize.xml
mobile/android/base/resources/xml-v11/preferences_customize_tablet.xml
mobile/android/base/resources/xml/preferences.xml.in
mobile/android/base/resources/xml/preferences_devtools.xml
mobile/android/base/strings.xml.in
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -572,16 +572,17 @@ RES_VALUES_V14 = \
   res/values-v14/styles.xml \
   $(NULL)
 
 RES_XML = \
   res/xml/preferences_display.xml \
   res/xml/preferences_search.xml \
   res/xml/preferences_privacy.xml \
   res/xml/preferences_vendor.xml \
+  res/xml/preferences_devtools.xml \
   $(SYNC_RES_XML) \
   $(NULL)
 
 RES_XML_V11 = \
   res/xml-v11/preferences_customize.xml \
   res/xml-v11/preference_headers.xml \
   res/xml-v11/preferences_customize_tablet.xml \
   res/xml-v11/preferences.xml \
--- a/mobile/android/base/locales/en-US/android_strings.dtd
+++ b/mobile/android/base/locales/en-US/android_strings.dtd
@@ -66,16 +66,18 @@
 <!ENTITY settings_title "Settings">
 <!ENTITY pref_category_customize "Customize">
 <!ENTITY pref_category_search "Search">
 <!ENTITY pref_category_display "Display">
 <!ENTITY pref_category_privacy_short "Privacy">
 <!ENTITY pref_category_vendor "&vendorShortName;">
 <!ENTITY pref_category_datareporting "Data choices">
 <!ENTITY pref_category_installed_search_engines "Installed search engines">
+<!ENTITY pref_category_devtools "Developer tools">
+<!ENTITY pref_developer_remotedebugging "Remote debugging">
 
 <!-- collected old strings - remove after determining final strings
      as part of Bug 877791 -->
 <!ENTITY pref_category_general "General">
 <!ENTITY pref_category_privacy "Privacy &amp; Security">
 <!ENTITY pref_category_content "Content">
 <!-- Localization note (datareporting_title) : This string matches
      (dataChoicesTab.label) in chrome/browser/preferences/advanced.dtd except in
@@ -88,16 +90,17 @@
 <!ENTITY pref_remember_signons "Remember passwords">
 
 <!-- Localization note: These are shown in the left sidebar on tablets -->
 <!ENTITY pref_header_customize "Customize">
 <!ENTITY pref_header_display "Display">
 <!ENTITY pref_header_privacy_short "Privacy">
 <!ENTITY pref_header_help "Help">
 <!ENTITY pref_header_vendor "&vendorShortName;">
+<!ENTITY pref_header_devtools "Developer tools">
 
 <!ENTITY pref_cookies_menu "Cookies">
 <!ENTITY pref_cookies_accept_all "Enabled">
 <!ENTITY pref_cookies_not_accept_foreign "Enabled, excluding 3rd party">
 <!ENTITY pref_cookies_disabled "Disabled">
 
 <!ENTITY pref_donottrack_menu "Tracking">
 <!ENTITY pref_donottrack_disallow_tracking "Tell sites that I do not want to be tracked">
--- a/mobile/android/base/resources/xml-v11/preference_headers.xml
+++ b/mobile/android/base/resources/xml-v11/preference_headers.xml
@@ -27,9 +27,16 @@
                android:value="preferences_privacy"/>
     </header>
 
     <header android:fragment="org.mozilla.gecko.GeckoPreferenceFragment"
             android:title="@string/pref_header_vendor">
         <extra android:name="resource"
                android:value="preferences_vendor"/>
     </header>
+
+    <header android:fragment="org.mozilla.gecko.GeckoPreferenceFragment"
+            android:title="@string/pref_header_devtools">
+        <extra android:name="resource"
+               android:value="preferences_devtools"/>
+    </header>
+
 </preference-headers>
--- a/mobile/android/base/resources/xml-v11/preferences.xml
+++ b/mobile/android/base/resources/xml-v11/preferences.xml
@@ -1,15 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <!-- Phone v11+ only: Sync is a top-level menu item.
-     See xml-v11/preference_headers.xml for tablet layout. -->
+     See xml-v11/preference_headers.xml for tablet layout.
+     Preference changes here should be mirrored to xml/preferences.xml.in. -->
 
 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
                   xmlns:gecko="http://schemas.android.com/apk/res-auto"
                   android:enabled="false">
 
     <org.mozilla.gecko.SyncPreference android:title="@string/pref_sync"
                                       android:persistent="false" />
 
@@ -33,9 +34,16 @@
     </PreferenceScreen>
 
 
     <PreferenceScreen android:title="@string/pref_category_vendor"
                       android:fragment="org.mozilla.gecko.GeckoPreferenceFragment" >
         <extra android:name="resource"
                android:value="preferences_vendor"/>
     </PreferenceScreen>
+
+    <PreferenceScreen android:title="@string/pref_category_devtools"
+                      android:fragment="org.mozilla.gecko.GeckoPreferenceFragment" >
+        <extra android:name="resource"
+               android:value="preferences_devtools"/>
+    </PreferenceScreen>
+
 </PreferenceScreen>
--- a/mobile/android/base/resources/xml-v11/preferences_customize.xml
+++ b/mobile/android/base/resources/xml-v11/preferences_customize.xml
@@ -1,13 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
+<!-- Changes should be mirrored to preferences_customize_tablet.xml. -->
+
 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
                   xmlns:gecko="http://schemas.android.com/apk/res-auto"
                   android:enabled="false">
 
      <PreferenceScreen android:title="@string/pref_category_search"
                        android:fragment="org.mozilla.gecko.GeckoPreferenceFragment" >
          <extra android:name="resource"
                 android:value="preferences_search"/>
--- a/mobile/android/base/resources/xml-v11/preferences_customize_tablet.xml
+++ b/mobile/android/base/resources/xml-v11/preferences_customize_tablet.xml
@@ -1,15 +1,16 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <!-- Tablet only: The contents under the "Customize" header for tablets,
-     See xml-v11/preferences.xml for single-pane v11+ phone layout. -->
+     See xml-v11/preferences.xml for single-pane v11+ phone layout.
+     Changes to preferences shoudl be mirrored to preferences_customize.xml. -->
 
 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
                   xmlns:gecko="http://schemas.android.com/apk/res-auto"
                   android:title="@string/pref_category_customize"
                   android:enabled="false">
 
     <org.mozilla.gecko.SyncPreference android:title="@string/pref_sync"
                                       android:persistent="false" />
--- a/mobile/android/base/resources/xml/preferences.xml.in
+++ b/mobile/android/base/resources/xml/preferences.xml.in
@@ -1,15 +1,17 @@
 #filter substitution
 <?xml version="1.0" encoding="utf-8"?>
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
-<!-- Preferences screen for pre-v11 Android devices that do not support PreferenceFragment or ActionBar -->
+<!-- Preferences screen for pre-v11 Android devices that do not support
+     PreferenceFragment or ActionBar. Preference changes here should be mirrored
+     to xml-v11/preferences.xml. -->
 
 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
                   xmlns:gecko="http://schemas.android.com/apk/res-auto"
                   android:enabled="false">
 
     <org.mozilla.gecko.SyncPreference android:title="@string/pref_sync"
                                       android:persistent="false" />
 
@@ -47,10 +49,19 @@
         <intent android:action="android.intent.action.VIEW"
                 android:targetPackage="@ANDROID_PACKAGE_NAME@"
                 android:targetClass="org.mozilla.gecko.GeckoPreferences" >
             <extra
                 android:name="resource"
                 android:value="preferences_vendor" />
         </intent>
     </PreferenceScreen>
+    <PreferenceScreen android:title="@string/pref_category_devtools">
+        <intent android:action="android.intent.action.VIEW"
+                android:targetPackage="@ANDROID_PACKAGE_NAME@"
+                android:targetClass="org.mozilla.gecko.GeckoPreferences" >
+            <extra
+                android:name="resource"
+                android:value="preferences_devtools" />
+        </intent>
+    </PreferenceScreen>
 
 </PreferenceScreen>
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/xml/preferences_devtools.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - License, v. 2.0. If a copy of the MPL was not distributed with this
+   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
+
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+                  xmlns:gecko="http://schemas.android.com/apk/res-auto"
+                  android:title="@string/pref_category_devtools"
+                  android:enabled="false">
+
+       <CheckBoxPreference android:key="devtools.debugger.remote-enabled"
+                           android:title="@string/pref_developer_remotedebugging" />
+
+</PreferenceScreen>
--- a/mobile/android/base/strings.xml.in
+++ b/mobile/android/base/strings.xml.in
@@ -79,21 +79,24 @@
   <string name="settings_title">&settings_title;</string>
   <string name="pref_category_customize">&pref_category_customize;</string>
   <string name="pref_category_search">&pref_category_search;</string>
   <string name="pref_category_display">&pref_category_display;</string>
   <string name="pref_category_privacy_short">&pref_category_privacy_short;</string>
   <string name="pref_category_vendor">&pref_category_vendor;</string>
   <string name="pref_category_datareporting">&pref_category_datareporting;</string>
   <string name="pref_category_installed_search_engines">&pref_category_installed_search_engines;</string>
+  <string name="pref_category_devtools">&pref_category_devtools;</string>
+  <string name="pref_developer_remotedebugging">&pref_developer_remotedebugging;</string>
 
   <string name="pref_header_customize">&pref_header_customize;</string>
   <string name="pref_header_display">&pref_header_display;</string>
   <string name="pref_header_privacy_short">&pref_header_privacy_short;</string>
   <string name="pref_header_vendor">&pref_header_vendor;</string>
+  <string name="pref_header_devtools">&pref_header_devtools;</string>
 
   <string name="pref_remember_signons">&pref_remember_signons;</string>
 
   <string name="pref_cookies_menu">&pref_cookies_menu;</string>
   <string name="pref_cookies_accept_all">&pref_cookies_accept_all;</string>
   <string name="pref_cookies_not_accept_foreign">&pref_cookies_not_accept_foreign;</string>
   <string name="pref_cookies_disabled">&pref_cookies_disabled;</string>