OLD | NEW |
1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- | 1 /* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- |
2 * This Source Code Form is subject to the terms of the Mozilla Public | 2 * This Source Code Form is subject to the terms of the Mozilla Public |
3 * License, v. 2.0. If a copy of the MPL was not distributed with this | 3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
5 | 5 |
6 package org.mozilla.gecko.home; | 6 package org.mozilla.gecko.home; |
7 | 7 |
8 import static org.mozilla.gecko.home.HomeConfig.createBuiltinPanelConfig; | 8 import static org.mozilla.gecko.home.HomeConfig.createBuiltinPanelConfig; |
9 | 9 |
10 import java.util.ArrayList; | 10 import java.util.ArrayList; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 // We disable reader mode support on low memory devices. Hence the | 77 // We disable reader mode support on low memory devices. Hence the |
78 // reading list panel should not show up on such devices. | 78 // reading list panel should not show up on such devices. |
79 if (!HardwareUtils.isLowMemoryPlatform()) { | 79 if (!HardwareUtils.isLowMemoryPlatform()) { |
80 panelConfigs.add(createBuiltinPanelConfig(mContext, PanelType.READIN
G_LIST)); | 80 panelConfigs.add(createBuiltinPanelConfig(mContext, PanelType.READIN
G_LIST)); |
81 } | 81 } |
82 | 82 |
83 final PanelConfig historyEntry = createBuiltinPanelConfig(mContext, Pane
lType.HISTORY); | 83 final PanelConfig historyEntry = createBuiltinPanelConfig(mContext, Pane
lType.HISTORY); |
84 final PanelConfig recentTabsEntry = createBuiltinPanelConfig(mContext, P
anelType.RECENT_TABS); | 84 final PanelConfig recentTabsEntry = createBuiltinPanelConfig(mContext, P
anelType.RECENT_TABS); |
85 | 85 |
86 // We disable Synced Tabs for guest mode profiles. | 86 // We disable Synced Tabs always (see https://issues.adblockplus.org/tic
ket/2480) |
87 final PanelConfig remoteTabsEntry; | 87 final PanelConfig remoteTabsEntry = null; |
88 if (RestrictedProfiles.isAllowed(mContext, RestrictedProfiles.Restrictio
n.DISALLOW_MODIFY_ACCOUNTS)) { | |
89 remoteTabsEntry = createBuiltinPanelConfig(mContext, PanelType.REMOT
E_TABS); | |
90 } else { | |
91 remoteTabsEntry = null; | |
92 } | |
93 | 88 |
94 // On tablets, we go [...|History|Recent Tabs|Synced Tabs]. | 89 // On tablets, we go [...|History|Recent Tabs|Synced Tabs]. |
95 // On phones, we go [Synced Tabs|Recent Tabs|History|...]. | 90 // On phones, we go [Synced Tabs|Recent Tabs|History|...]. |
96 if (HardwareUtils.isTablet()) { | 91 if (HardwareUtils.isTablet()) { |
97 panelConfigs.add(historyEntry); | 92 panelConfigs.add(historyEntry); |
98 panelConfigs.add(recentTabsEntry); | 93 panelConfigs.add(recentTabsEntry); |
99 if (remoteTabsEntry != null) { | 94 if (remoteTabsEntry != null) { |
100 panelConfigs.add(remoteTabsEntry); | 95 panelConfigs.add(remoteTabsEntry); |
101 } | 96 } |
102 } else { | 97 } else { |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 lbm.unregisterReceiver(mReloadBroadcastReceiver); | 378 lbm.unregisterReceiver(mReloadBroadcastReceiver); |
384 } | 379 } |
385 | 380 |
386 private class ReloadBroadcastReceiver extends BroadcastReceiver { | 381 private class ReloadBroadcastReceiver extends BroadcastReceiver { |
387 @Override | 382 @Override |
388 public void onReceive(Context context, Intent intent) { | 383 public void onReceive(Context context, Intent intent) { |
389 mReloadListener.onReload(); | 384 mReloadListener.onReload(); |
390 } | 385 } |
391 } | 386 } |
392 } | 387 } |
OLD | NEW |