Bug 708114 part 2 - Add resource flag to enable Android StrictMode for nightly and local builds. r=dougt a=android-only
authorChris Peterson <cpeterson@mozilla.com>
Mon, 12 Dec 2011 17:15:38 -0800
changeset 84112 3c321d2c988400e34a77bc355bc404c1f7b55d13
parent 84111 aabb495e026a14c0fd4a69e9496a8ffaa97d4034
child 84113 4b71b1e9cc0c30b13ee67d71d4030b6754ab0e38
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdougt, android-only
bugs708114
milestone11.0a1
first release with
nightly linux32
3c321d2c9884 / 11.0a1 / 20111213031157 / files
nightly linux64
3c321d2c9884 / 11.0a1 / 20111213031157 / files
nightly mac
3c321d2c9884 / 11.0a1 / 20111213031157 / files
nightly win32
3c321d2c9884 / 11.0a1 / 20111213031157 / files
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 708114 part 2 - Add resource flag to enable Android StrictMode for nightly and local builds. r=dougt a=android-only
mobile/android/base/GeckoApp.java
mobile/android/base/Makefile.in
mobile/android/branding/aurora/res/values/defaults.xml
mobile/android/branding/beta/res/values/defaults.xml
mobile/android/branding/nightly/res/values/defaults.xml
mobile/android/branding/official/res/values/defaults.xml
mobile/android/branding/unofficial/res/values/defaults.xml
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -1256,18 +1256,20 @@ abstract public class GeckoApp
             }
         });
     }
 
     /** Called when the activity is first created. */
     @Override
     public void onCreate(Bundle savedInstanceState)
     {
-        // Uncomment to run StrictMode tests:
-        // enableStrictMode();
+        // StrictMode is set by defaults resource flag |enableStrictMode|.
+        if (getResources().getBoolean(R.bool.enableStrictMode)) {
+            enableStrictMode();
+        }
 
         System.loadLibrary("mozutils");
         mMainHandler = new Handler();
         Log.w(LOGTAG, "zerdatime " + new Date().getTime() + " - onCreate");
         if (savedInstanceState != null) {
             mLastUri = savedInstanceState.getString(SAVED_STATE_URI);
             mLastTitle = savedInstanceState.getString(SAVED_STATE_TITLE);
             mLastViewport = savedInstanceState.getString(SAVED_STATE_VIEWPORT);
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -200,21 +200,22 @@ RES_LAYOUT = \
 
 RES_LAYOUT_V11 = \
   res/layout-v11/awesomebar_search.xml \
   res/layout-v11/gecko_app.xml \
   res/layout-v11/gecko_app_actionbar.xml \
   $(NULL)
 
 RES_VALUES = \
+  res/values/defaults.xml \
   res/values/colors.xml \
   res/values/styles.xml \
   res/values/themes.xml \
   $(NULL)
- 
+
 RES_VALUES_V11 = \
   res/values-v11/styles.xml \
   res/values-v11/themes.xml \
   $(NULL)
 
 RES_XML = res/xml/preferences.xml
 
 RES_ANIM = \
@@ -426,20 +427,24 @@ RES_DRAWABLE = $(addprefix res/drawable/
 $(RES_LAYOUT): $(subst res/,$(srcdir)/resources/,$(RES_LAYOUT))
 	$(NSINSTALL) -D res/layout
 	$(NSINSTALL) $^  res/layout
 
 $(RES_LAYOUT_V11): $(subst res/,$(srcdir)/resources/,$(RES_LAYOUT_V11))
 	$(NSINSTALL) -D res/layout-v11
 	$(NSINSTALL) $(srcdir)/resources/layout-v11/* res/layout-v11/
 
-$(RES_VALUES): $(subst res/,$(srcdir)/resources/,$(RES_VALUES))
+$(RES_VALUES): \
+		$(srcdir)/resources/values/colors.xml \
+		$(srcdir)/resources/values/styles.xml \
+		$(srcdir)/resources/values/themes.xml \
+		$(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/res/values/defaults.xml
 	$(NSINSTALL) -D res/values
 	$(NSINSTALL) $^  res/values
- 
+
 $(RES_VALUES_V11): $(subst res/,$(srcdir)/resources/,$(RES_VALUES_V11))
 	$(NSINSTALL) -D res/values-v11
 	$(NSINSTALL) $(srcdir)/resources/values-v11/*  res/values-v11
 
 $(RES_XML): $(subst res/,$(srcdir)/resources/,$(RES_XML))
 	$(NSINSTALL) -D res/xml
 	$(NSINSTALL) $(srcdir)/resources/xml/* res/xml/
 
new file mode 100644
--- /dev/null
+++ b/mobile/android/branding/aurora/res/values/defaults.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <bool name="enableStrictMode">false</bool>
+</resources>
new file mode 100644
--- /dev/null
+++ b/mobile/android/branding/beta/res/values/defaults.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <bool name="enableStrictMode">false</bool>
+</resources>
new file mode 100644
--- /dev/null
+++ b/mobile/android/branding/nightly/res/values/defaults.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <bool name="enableStrictMode">true</bool>
+</resources>
new file mode 100644
--- /dev/null
+++ b/mobile/android/branding/official/res/values/defaults.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <bool name="enableStrictMode">false</bool>
+</resources>
new file mode 100644
--- /dev/null
+++ b/mobile/android/branding/unofficial/res/values/defaults.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <bool name="enableStrictMode">true</bool>
+</resources>