Backed out changeset 965133e168d9 (bug 1189790) for android build failures CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Fri, 14 Aug 2015 15:30:24 -0700
changeset 257887 6bb8ca8a857c6ba3e6e642e166de126b9c413200
parent 257886 0807a9416c4511dcafbd4f3e6220d828a6d2d36d
child 257900 1c99f0dbfcf80bf70f7a4a477666457a70035211
push id14682
push userkwierso@gmail.com
push dateFri, 14 Aug 2015 22:30:26 +0000
treeherderfx-team@6bb8ca8a857c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1189790
milestone43.0a1
backs out965133e168d94f2c65b3d0ad831734fc08a6afd2
Backed out changeset 965133e168d9 (bug 1189790) for android build failures CLOSED TREE
mobile/android/base/GeckoProfile.java
mobile/android/base/db/LocalBrowserDB.java
mobile/android/base/resources/raw/bookmarkdefaults_favicon_restricted_support.png
mobile/android/base/resources/raw/bookmarkdefaults_favicon_restricted_webmaker.png
mobile/android/base/strings.xml.in
mobile/android/base/util/UnusedResourcesUtil.java
mobile/locales/en-US/profile/bookmarks.inc
--- a/mobile/android/base/GeckoProfile.java
+++ b/mobile/android/base/GeckoProfile.java
@@ -904,16 +904,19 @@ public final class GeckoProfile {
                 // Because we are running in the background, we want to synchronize on the
                 // GeckoProfile instance so that we don't race with main thread operations
                 // such as locking/unlocking/removing the profile.
                 synchronized (GeckoProfile.this) {
                     // Skip initialization if the profile directory has been removed.
                     if (!profileDir.exists()) {
                         return;
                     }
+                    if (RestrictedProfiles.isUserRestricted(context)) {
+                        return;
+                    }
 
                     // We pass the number of added bookmarks to ensure that the
                     // indices of the distribution and default bookmarks are
                     // contiguous. Because there are always at least as many
                     // bookmarks as there are favicons, we can also guarantee that
                     // the favicon IDs won't overlap.
                     final LocalBrowserDB db = new LocalBrowserDB(getName());
                     final int offset = distribution == null ? 0 : db.addDistributionBookmarks(cr, distribution, 0);
--- a/mobile/android/base/db/LocalBrowserDB.java
+++ b/mobile/android/base/db/LocalBrowserDB.java
@@ -35,17 +35,16 @@ import org.mozilla.gecko.db.BrowserContr
 import org.mozilla.gecko.db.BrowserContract.ReadingListItems;
 import org.mozilla.gecko.db.BrowserContract.SearchHistory;
 import org.mozilla.gecko.db.BrowserContract.SyncColumns;
 import org.mozilla.gecko.db.BrowserContract.Thumbnails;
 import org.mozilla.gecko.distribution.Distribution;
 import org.mozilla.gecko.favicons.decoders.FaviconDecoder;
 import org.mozilla.gecko.favicons.decoders.LoadFaviconResult;
 import org.mozilla.gecko.gfx.BitmapUtils;
-import org.mozilla.gecko.RestrictedProfiles;
 import org.mozilla.gecko.sync.Utils;
 import org.mozilla.gecko.util.GeckoJarReader;
 import org.mozilla.gecko.util.StringUtils;
 
 import android.content.ContentProviderOperation;
 import android.content.ContentResolver;
 import android.content.ContentValues;
 import android.content.Context;
@@ -220,31 +219,16 @@ public class LocalBrowserDB implements B
         for (int i = 0; i < fields.length; i++) {
             final String name = fields[i].getName();
             final Matcher m = p.matcher(name);
             if (!m.find()) {
                 continue;
             }
 
             try {
-                if (RestrictedProfiles.isRestrictedProfile()) {
-                    // matching on variable name from strings.xml.in
-                    final String addons = "bookmarkdefaults_title_addons";
-                    final String marketplace = "bookmarkdefaults_title_marketplace";
-                    final String regularSumo = "bookmarkdefaults_title_support";
-                    if (name.equals(addons) || name.equals(marketplace) || name.equals(regularSumo)) {
-                        continue;
-                    }
-                }
-                if (!RestrictedProfiles.isRestrictedProfile()) {
-                    // if we're not in kidfox, skip the kidfox specific bookmark(s)
-                    if (name.startsWith("bookmarkdefaults_title_restricted")) {
-                        continue;
-                    }
-                }
                 final int titleID = fields[i].getInt(null);
                 final String title = context.getString(titleID);
 
                 final Field urlField = stringsClass.getField(name.replace("_title_", "_url_"));
                 final int urlID = urlField.getInt(null);
                 final String url = context.getString(urlID);
 
                 final ContentValues bookmarkValue = createBookmark(now, title, url, pos++, folderID);
deleted file mode 100644
index ea7d6a3aeb309205443e72cdb6666bd3201f19ce..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100644
index ad177aa868450fbdea94533aa351aa40380561dc..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
--- a/mobile/android/base/strings.xml.in
+++ b/mobile/android/base/strings.xml.in
@@ -460,22 +460,16 @@
   <!-- Icon is automatically generated from R.drawable.bookmarkdefaults_favicon_support -->
   <string name="bookmarkdefaults_title_support">@bookmarks_support@</string>
   <string name="bookmarkdefaults_url_support">https://support.mozilla.org/products/mobile</string>
 
   <!-- Icon is automatically generated from R.drawable.bookmarkdefaults_favicon_marketplace -->
   <string name="bookmarkdefaults_title_marketplace">@bookmarks_marketplace@</string>
   <string name="bookmarkdefaults_url_marketplace">https://marketplace.firefox.com/</string>
 
-  <string name="bookmarkdefaults_title_restricted_webmaker">@bookmarks_restricted_webmaker@</string>
-  <string name="bookmarkdefaults_url_restricted_webmaker">https://webmaker.org/</string>
-
-  <string name="bookmarkdefaults_title_restricted_support">@bookmarks_restricted_support@</string>
-  <string name="bookmarkdefaults_url_restricted_support">https://support.mozilla.org/kb/kids</string>
-
   <!-- Site identity popup -->
   <string name="identity_connection_secure">&identity_connection_secure;</string>
   <string name="identity_connection_insecure">&identity_connection_insecure;</string>
 
   <string name="mixed_content_blocked_all">&mixed_content_blocked_all1;</string>
   <string name="mixed_content_blocked_some">&mixed_content_blocked_some1;</string>
   <string name="mixed_content_display_loaded">&mixed_content_display_loaded1;</string>
   <string name="mixed_content_protection_disabled">&mixed_content_protection_disabled1;</string>
--- a/mobile/android/base/util/UnusedResourcesUtil.java
+++ b/mobile/android/base/util/UnusedResourcesUtil.java
@@ -57,18 +57,16 @@ final class UnusedResourcesUtil {
             R.drawable.suggestedsites_fxsupport,
             R.drawable.suggestedsites_mozilla,
     };
 
     public static final int[] USED_IN_BOOKMARKDEFAULTS = {
             R.raw.bookmarkdefaults_favicon_addons,
             R.raw.bookmarkdefaults_favicon_marketplace,
             R.raw.bookmarkdefaults_favicon_support,
-            R.raw.bookmarkdefaults_favicon_restricted_support,
-            R.raw.bookmarkdefaults_favicon_restricted_webmaker,
     };
 
     public static final int[] USED_IN_PREFS = {
             R.xml.preferences_devtools,
             R.xml.preferences_display,
             R.xml.preferences_home,
             R.xml.preferences_privacy,
     };
--- a/mobile/locales/en-US/profile/bookmarks.inc
+++ b/mobile/locales/en-US/profile/bookmarks.inc
@@ -25,17 +25,9 @@
 # LOCALIZATION NOTE (bookmarks_support):
 # link title for https://support.mozilla.org/
 #define bookmarks_support Firefox: Support
 
 # LOCALIZATION NOTE (bookmarks_marketplace):
 # link title for https://marketplace.firefox.com
 #define bookmarks_marketplace Firefox Marketplace
 
-# LOCALIZATION NOTE (bookmarks_restricted_support):
-# link title for https://support.mozilla.org/kb/kids
-#define bookmarks_restricted_support Firefox Help and Support for a simplified kid-friendly version of Firefox
-
-# LOCALIZATION NOTE (bookmarks_restricted_webmaker):
-# link title for https://webmaker.org
-#define bookmarks_restricted_webmaker Learn the Web: Mozilla Webmaker
-
 #unfilter emptyLines