Bug 1139672 - Home panels: Update default order. r=margaret

This commit is contained in:
Sebastian Kaspari 2015-08-03 15:29:37 +02:00
parent b828eef9e5
commit 09c7b85ccf
2 changed files with 7 additions and 16 deletions

View File

@ -74,24 +74,15 @@ class HomeConfigPrefsBackend implements HomeConfigBackend {
EnumSet.of(PanelConfig.Flags.DEFAULT_PANEL)));
panelConfigs.add(createBuiltinPanelConfig(mContext, PanelType.BOOKMARKS));
panelConfigs.add(createBuiltinPanelConfig(mContext, PanelType.READING_LIST));
panelConfigs.add(createBuiltinPanelConfig(mContext, PanelType.HISTORY));
final PanelConfig historyEntry = createBuiltinPanelConfig(mContext, PanelType.HISTORY);
final PanelConfig recentTabsEntry = createBuiltinPanelConfig(mContext, PanelType.RECENT_TABS);
// We disable Synced Tabs for guest mode profiles.
final PanelConfig remoteTabsEntry;
// We disable Synced Tabs for guest mode / restricted profiles.
if (RestrictedProfiles.isAllowed(mContext, Restriction.DISALLOW_MODIFY_ACCOUNTS)) {
remoteTabsEntry = createBuiltinPanelConfig(mContext, PanelType.REMOTE_TABS);
} else {
remoteTabsEntry = null;
panelConfigs.add(createBuiltinPanelConfig(mContext, PanelType.REMOTE_TABS));
}
panelConfigs.add(historyEntry);
panelConfigs.add(recentTabsEntry);
if (remoteTabsEntry != null) {
panelConfigs.add(remoteTabsEntry);
}
panelConfigs.add(createBuiltinPanelConfig(mContext, PanelType.RECENT_TABS));
panelConfigs.add(createBuiltinPanelConfig(mContext, PanelType.READING_LIST));
return new State(panelConfigs, true);
}

View File

@ -34,10 +34,10 @@ public class AboutHomeComponent extends BaseComponent {
private static final List<PanelType> PANEL_ORDERING = Arrays.asList(
PanelType.TOP_SITES,
PanelType.BOOKMARKS,
PanelType.READING_LIST,
PanelType.HISTORY,
PanelType.REMOTE_TABS,
PanelType.RECENT_TABS,
PanelType.REMOTE_TABS
PanelType.READING_LIST
);
// The percentage of the panel to swipe between 0 and 1. This value was set through