зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1189790 - Include bookmarks for Kinderfox.r=sebastian
This commit is contained in:
Родитель
234d758c65
Коммит
0d4b818f47
|
@ -909,9 +909,6 @@ public final class GeckoProfile {
|
||||||
if (!profileDir.exists()) {
|
if (!profileDir.exists()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (RestrictedProfiles.isUserRestricted(context)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// We pass the number of added bookmarks to ensure that the
|
// We pass the number of added bookmarks to ensure that the
|
||||||
// indices of the distribution and default bookmarks are
|
// indices of the distribution and default bookmarks are
|
||||||
|
|
|
@ -40,6 +40,7 @@ import org.mozilla.gecko.distribution.Distribution;
|
||||||
import org.mozilla.gecko.favicons.decoders.FaviconDecoder;
|
import org.mozilla.gecko.favicons.decoders.FaviconDecoder;
|
||||||
import org.mozilla.gecko.favicons.decoders.LoadFaviconResult;
|
import org.mozilla.gecko.favicons.decoders.LoadFaviconResult;
|
||||||
import org.mozilla.gecko.gfx.BitmapUtils;
|
import org.mozilla.gecko.gfx.BitmapUtils;
|
||||||
|
import org.mozilla.gecko.RestrictedProfiles;
|
||||||
import org.mozilla.gecko.sync.Utils;
|
import org.mozilla.gecko.sync.Utils;
|
||||||
import org.mozilla.gecko.util.GeckoJarReader;
|
import org.mozilla.gecko.util.GeckoJarReader;
|
||||||
import org.mozilla.gecko.util.StringUtils;
|
import org.mozilla.gecko.util.StringUtils;
|
||||||
|
@ -224,6 +225,21 @@ public class LocalBrowserDB implements BrowserDB {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
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 int titleID = fields[i].getInt(null);
|
||||||
final String title = context.getString(titleID);
|
final String title = context.getString(titleID);
|
||||||
|
|
||||||
|
|
Двоичные данные
mobile/android/base/resources/raw/bookmarkdefaults_favicon_restricted_support.png
Normal file
Двоичные данные
mobile/android/base/resources/raw/bookmarkdefaults_favicon_restricted_support.png
Normal file
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 20 KiB |
Двоичные данные
mobile/android/base/resources/raw/bookmarkdefaults_favicon_restricted_webmaker.png
Normal file
Двоичные данные
mobile/android/base/resources/raw/bookmarkdefaults_favicon_restricted_webmaker.png
Normal file
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 5.3 KiB |
|
@ -465,6 +465,12 @@
|
||||||
<string name="bookmarkdefaults_title_marketplace">@bookmarks_marketplace@</string>
|
<string name="bookmarkdefaults_title_marketplace">@bookmarks_marketplace@</string>
|
||||||
<string name="bookmarkdefaults_url_marketplace">https://marketplace.firefox.com/</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 -->
|
<!-- Site identity popup -->
|
||||||
<string name="identity_connection_secure">&identity_connection_secure;</string>
|
<string name="identity_connection_secure">&identity_connection_secure;</string>
|
||||||
<string name="identity_connection_insecure">&identity_connection_insecure;</string>
|
<string name="identity_connection_insecure">&identity_connection_insecure;</string>
|
||||||
|
|
|
@ -62,6 +62,8 @@ final class UnusedResourcesUtil {
|
||||||
R.raw.bookmarkdefaults_favicon_addons,
|
R.raw.bookmarkdefaults_favicon_addons,
|
||||||
R.raw.bookmarkdefaults_favicon_marketplace,
|
R.raw.bookmarkdefaults_favicon_marketplace,
|
||||||
R.raw.bookmarkdefaults_favicon_support,
|
R.raw.bookmarkdefaults_favicon_support,
|
||||||
|
R.raw.bookmarkdefaults_favicon_restricted_support,
|
||||||
|
R.raw.bookmarkdefaults_favicon_restricted_webmaker,
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final int[] USED_IN_PREFS = {
|
public static final int[] USED_IN_PREFS = {
|
||||||
|
|
|
@ -30,4 +30,12 @@
|
||||||
# link title for https://marketplace.firefox.com
|
# link title for https://marketplace.firefox.com
|
||||||
#define bookmarks_marketplace Firefox Marketplace
|
#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
|
#unfilter emptyLines
|
||||||
|
|
Загрузка…
Ссылка в новой задаче