Bug 787188 - Hold off on about:home marketplace promo for now r=wesj
authorMark Finkle <mfinkle@mozilla.com>
Wed, 26 Sep 2012 08:24:30 -0400
changeset 108133 c6dab1c5387cd4867720cd06b5397b7855e6d118
parent 108132 bb07e91c012dcb85d4ec2979ea23832e0cce7268
child 108134 67be22778e307f379a647d237445c6891365271b
push id23539
push userryanvm@gmail.com
push dateWed, 26 Sep 2012 22:55:55 +0000
treeherderautoland@ec079fd92224 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj
bugs787188
milestone18.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 787188 - Hold off on about:home marketplace promo for now r=wesj
mobile/android/base/AboutHomeContent.java
mobile/android/base/AboutHomeContent.java.in
mobile/android/base/Makefile.in
mobile/android/base/resources/menu-large-v11/browser_app_menu.xml.in
mobile/android/base/resources/menu-v11/browser_app_menu.xml.in
mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml.in
mobile/android/base/resources/menu/browser_app_menu.xml.in
rename from mobile/android/base/AboutHomeContent.java
rename to mobile/android/base/AboutHomeContent.java.in
--- a/mobile/android/base/AboutHomeContent.java
+++ b/mobile/android/base/AboutHomeContent.java.in
@@ -216,16 +216,30 @@ public class AboutHomeContent extends Sc
 
     private void updateLayout(boolean syncIsSetup) {
         boolean hasTopSites = mTopSitesAdapter.getCount() > 0;
         setTopSitesVisibility(hasTopSites);
 
         AboutHomePromoBox.Type type = mPrelimPromoBoxType;
         if (syncIsSetup && type == AboutHomePromoBox.Type.SYNC)
             type = AboutHomePromoBox.Type.APPS;
+
+// Remove the Apps promo from Beta and Release until we get go-ahead from Marketplace team.
+// Two blocks are silly, but the preprocessor does not support complex expressions and I
+// am not trying to make something elegant here. This code should disappear soon or the
+// entire feature should be removed.
+#if MOZ_UPDATE_CHANNEL == beta
+        if (type == AboutHomePromoBox.Type.APPS)
+            type = (syncIsSetup ? AboutHomePromoBox.Type.NONE : AboutHomePromoBox.Type.SYNC);
+#endif
+#if MOZ_UPDATE_CHANNEL == release
+        if (type == AboutHomePromoBox.Type.APPS)
+            type = (syncIsSetup ? AboutHomePromoBox.Type.NONE : AboutHomePromoBox.Type.SYNC);
+#endif
+
         mPromoBox.show(type);
     }
 
     private void updateLayoutForSync() {
         final GeckoApp.StartupMode startupMode = mActivity.getStartupMode();
         final boolean syncIsSetup = SyncAccounts.syncAccountsExist(mContext);
 
         post(new Runnable() {
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -30,17 +30,16 @@ UTIL_JAVA_FILES := \
   GeckoJarReader.java \
   INIParser.java \
   INISection.java \
   util/EventDispatcher.java \
   util/FloatUtils.java \
   $(NULL)
 
 FENNEC_JAVA_FILES = \
-  AboutHomeContent.java \
   AboutHomePromoBox.java \
   AboutHomeSection.java \
   ActivityHandlerHelper.java \
   AndroidImport.java \
   AndroidImportPreference.java \
   AlertNotification.java \
   AwesomeBar.java \
   AwesomebarResultHandler.java \
@@ -176,16 +175,17 @@ FENNEC_JAVA_FILES = \
   $(NULL)
 
 ifdef MOZ_WEBSMS_BACKEND
 FENNEC_JAVA_FILES += GeckoSmsManager.java
 endif
 
 FENNEC_PP_JAVA_FILES = \
   App.java \
+  AboutHomeContent.java \
   MarketplaceApp.java \
   WebApp.java \
   WebApps.java \
   GeckoActivity.java \
   LauncherShortcuts.java \
   NotificationHandler.java \
   Restarter.java \
   db/BrowserContract.java \
--- a/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml.in
+++ b/mobile/android/base/resources/menu-large-v11/browser_app_menu.xml.in
@@ -41,18 +41,22 @@
                   android:title="@string/save_as_pdf" />
 
             <item android:id="@+id/addons"
                   android:title="@string/addons"/>
 
             <item android:id="@+id/downloads"
                   android:title="@string/downloads"/>
 
+#if MOZ_UPDATE_CHANNEL != beta
+#if MOZ_UPDATE_CHANNEL != release
             <item android:id="@+id/apps"
                   android:title="@string/apps"/>
+#endif
+#endif
 
         </menu>
 
     </item>
 
     <item android:id="@+id/char_encoding"
           android:visible="false"
           android:title="@string/char_encoding"/>
--- a/mobile/android/base/resources/menu-v11/browser_app_menu.xml.in
+++ b/mobile/android/base/resources/menu-v11/browser_app_menu.xml.in
@@ -42,18 +42,22 @@
                   android:title="@string/save_as_pdf" />
 
             <item android:id="@+id/addons"
                   android:title="@string/addons"/>
 
             <item android:id="@+id/downloads"
                   android:title="@string/downloads"/>
 
+#if MOZ_UPDATE_CHANNEL != beta
+#if MOZ_UPDATE_CHANNEL != release
             <item android:id="@+id/apps"
                   android:title="@string/apps"/>
+#endif
+#endif
 
         </menu>
 
     </item>
 
     <item android:id="@+id/char_encoding"
           android:visible="false"
           android:title="@string/char_encoding"/>
--- a/mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml.in
+++ b/mobile/android/base/resources/menu-xlarge-v11/browser_app_menu.xml.in
@@ -42,18 +42,22 @@
                   android:title="@string/save_as_pdf" />
 
             <item android:id="@+id/addons"
                   android:title="@string/addons"/>
 
             <item android:id="@+id/downloads"
                   android:title="@string/downloads"/>
 
+#if MOZ_UPDATE_CHANNEL != beta
+#if MOZ_UPDATE_CHANNEL != release
             <item android:id="@+id/apps"
                   android:title="@string/apps"/>
+#endif
+#endif
 
         </menu>
 
     </item>
 
     <item android:id="@+id/char_encoding"
           android:visible="false"
           android:title="@string/char_encoding"/>
--- a/mobile/android/base/resources/menu/browser_app_menu.xml.in
+++ b/mobile/android/base/resources/menu/browser_app_menu.xml.in
@@ -33,18 +33,22 @@
           android:checkable="true" />
 
     <item android:id="@+id/addons"
           android:title="@string/addons"/>
 
     <item android:id="@+id/downloads"
           android:title="@string/downloads"/>
 
+#if MOZ_UPDATE_CHANNEL != beta
+#if MOZ_UPDATE_CHANNEL != release
     <item android:id="@+id/apps"
           android:title="@string/apps"/>
+#endif
+#endif
 
     <item android:id="@+id/char_encoding"
           android:visible="false"
           android:title="@string/char_encoding"/>
 
     <item android:id="@+id/settings"
           android:title="@string/settings" />