Bug 1068005 - Hide new tablet UI toggle on phones (r=mcomella)

This commit is contained in:
Lucas Rocha 2014-09-17 14:20:36 +01:00
parent aee0770a6d
commit fa6d117317
2 changed files with 7 additions and 5 deletions

View File

@ -661,9 +661,9 @@ OnSharedPreferenceChangeListener
preferences.removePreference(pref);
i--;
continue;
} else if (AppConstants.RELEASE_BUILD &&
} else if ((AppConstants.RELEASE_BUILD || !HardwareUtils.isTablet()) &&
PREFS_NEW_TABLET_UI.equals(key)) {
// Remove toggle for new tablet UI on release builds.
// Remove toggle for new tablet UI on release builds and phones.
preferences.removePreference(pref);
i--;
continue;

View File

@ -159,9 +159,11 @@ public class testSettingsMenuItems extends PixelTest {
String[] textReflowUi = { StringHelper.TEXT_REFLOW_LABEL };
settingsMap.get(PATH_DISPLAY).add(textReflowUi);
// New tablet UI can only be enabled in non-release build
String[] newTabletUi = { StringHelper.NEW_TABLET_UI };
settingsMap.get(PATH_DISPLAY).add(newTabletUi);
// New tablet UI can only be enabled on tablets in non-release builds.
if (HardwareUtils.isTablet()) {
String[] newTabletUi = { StringHelper.NEW_TABLET_UI };
settingsMap.get(PATH_DISPLAY).add(newTabletUi);
}
// New tablet UI: we don't allow a page title option.
if (NewTabletUI.isEnabled(getActivity())) {