Bug 1369673 - remove flag localeSwitchingIsEnabled from GeckoPreferences r=nalexander

remove the flag from GeckoPreferences as it is always true

MozReview-Commit-ID: J5bJwnaRFDa

--HG--
extra : rebase_source : 012ae9f1a220c7fd98f0b88c64dcbae4ad85b70c
This commit is contained in:
friedger 2017-06-14 13:50:49 +02:00
parent 7d5f2e43a8
commit ab7ccca330
6 changed files with 0 additions and 37 deletions

View File

@ -204,13 +204,6 @@ public class AppConstants {
false;
//#endif
public static final boolean MOZ_LOCALE_SWITCHER =
//#ifdef MOZ_LOCALE_SWITCHER
true;
//#else
false;
//#endif
public static final boolean MOZ_UPDATER =
//#ifdef MOZ_UPDATER
true;

View File

@ -53,7 +53,6 @@ def _defines():
'MOZ_CRASHREPORTER',
'MOZ_DEBUG',
'MOZ_INSTALL_TRACKING',
'MOZ_LOCALE_SWITCHER',
'MOZ_NATIVE_DEVICES',
'MOZ_SWITCHBOARD'):
if CONFIG[var]:

View File

@ -79,11 +79,6 @@ public class BrowserLocaleManager implements LocaleManager {
}
}
@Override
public boolean isEnabled() {
return AppConstants.MOZ_LOCALE_SWITCHER;
}
/**
* Ensure that you call this early in your application startup,
* and with a context that's sufficiently long-lived (typically

View File

@ -19,10 +19,6 @@ import android.content.res.Resources;
public interface LocaleManager {
void initialize(Context context);
/**
* @return true if locale switching is enabled.
*/
boolean isEnabled();
Locale getCurrentLocale(Context context);
String getAndApplyPersistedLocale(Context context);
void correctLocale(Context context, Resources resources, Configuration newConfig);

View File

@ -214,7 +214,6 @@ public class GeckoPreferences
* Track the last locale so we know whether to redisplay.
*/
private Locale lastLocale = Locale.getDefault();
private boolean localeSwitchingIsEnabled;
private void startActivityForResultChoosingTransition(final Intent intent, final int requestCode) {
startActivityForResult(intent, requestCode);
@ -356,10 +355,6 @@ public class GeckoPreferences
// Apply the current user-selected locale, if necessary.
checkLocale();
// Track this so we can decide whether to show locale options.
// See also the workaround below for Bug 1015209.
localeSwitchingIsEnabled = BrowserLocaleManager.getInstance().isEnabled();
// For Android v11+ where we use Fragments (v11+ only due to bug 866352),
// check that PreferenceActivity.EXTRA_SHOW_FRAGMENT has been set
// (or set it) before super.onCreate() is called so Android can display
@ -663,17 +658,6 @@ public class GeckoPreferences
private void setupPreferences(PreferenceGroup preferences, ArrayList<String> prefs) {
for (int i = 0; i < preferences.getPreferenceCount(); i++) {
final Preference pref = preferences.getPreference(i);
// Eliminate locale switching if necessary.
// This logic will need to be extended when
// content language selection (Bug 881510) is implemented.
if (!localeSwitchingIsEnabled &&
"preferences_locale".equals(pref.getExtras().getString("resource"))) {
preferences.removePreference(pref);
i--;
continue;
}
String key = pref.getKey();
if (pref instanceof PreferenceGroup) {
// If datareporting is disabled, remove UI.

View File

@ -8,10 +8,6 @@ project_flag('MOZ_ANDROID_EXCLUDE_FONTS',
help='Whether to exclude font files from the build',
default=True)
project_flag('MOZ_LOCALE_SWITCHER',
help='Enable runtime locale switching',
default=True)
project_flag('MOZ_ANDROID_GCM',
help='Enable GCM (Google Cloud Messaging) registration',
default=True,