Update SystemUI for sw600dp devices.
Devices between 600 and 719dp will now use the two-bar
(phone) SystemUI layout, or something like it, derived from
PhoneStatusBar. Devices above 720dp will use the system bar
from TabletStatusBar.
However, this distinction is not to be made based on dp, at
least, not by the SystemUI; the goal is to drive most of
this switch from the window manager. Therefore most of
SystemUI's sw600dp resources have been folded into the main
set of resources (renaming them to avoid collisions where
appropriate). This allows SystemUI to choose which set of
resources to use entirely by switching status bar
components, entirely independent of Configuration.
(For some resources, particularly around recents, it seemed
more expeditious to keep relying on the device
configuration, so those resources have been bumped up to
sw720dp.)
Bug: 6297838
Change-Id: I3f5414a6a718bdc83f51930d6878cdf97df48c9c
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
index c868f78..7b3b745 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
@@ -225,7 +225,7 @@
// Notification Panel
mNotificationPanel = (NotificationPanel)View.inflate(context,
- R.layout.status_bar_notification_panel, null);
+ R.layout.system_bar_notification_panel, null);
mNotificationPanel.setBar(this);
mNotificationPanel.show(false, false);
mNotificationPanel.setOnTouchListener(
@@ -286,7 +286,7 @@
// Notification preview window
if (NOTIFICATION_PEEK_ENABLED) {
mNotificationPeekWindow = (NotificationPeekPanel) View.inflate(context,
- R.layout.status_bar_notification_peek, null);
+ R.layout.system_bar_notification_peek, null);
mNotificationPeekWindow.setBar(this);
mNotificationPeekRow = (ViewGroup) mNotificationPeekWindow.findViewById(R.id.content);
@@ -330,7 +330,7 @@
// Input methods Panel
mInputMethodsPanel = (InputMethodsPanel) View.inflate(context,
- R.layout.status_bar_input_methods_panel, null);
+ R.layout.system_bar_input_methods_panel, null);
mInputMethodsPanel.setHardKeyboardEnabledChangeListener(this);
mInputMethodsPanel.setOnTouchListener(new TouchOutsideListener(
MSG_CLOSE_INPUT_METHODS_PANEL, mInputMethodsPanel));
@@ -353,7 +353,7 @@
// Compatibility mode selector panel
mCompatModePanel = (CompatModePanel) View.inflate(context,
- R.layout.status_bar_compat_mode_panel, null);
+ R.layout.system_bar_compat_mode_panel, null);
mCompatModePanel.setOnTouchListener(new TouchOutsideListener(
MSG_CLOSE_COMPAT_MODE_PANEL, mCompatModePanel));
mCompatModePanel.setTrigger(mCompatModeButton);
@@ -465,7 +465,7 @@
loadDimens();
final TabletStatusBarView sb = (TabletStatusBarView)View.inflate(
- context, R.layout.status_bar, null);
+ context, R.layout.system_bar, null);
mStatusBarView = sb;
sb.setHandler(mHandler);
@@ -647,7 +647,7 @@
}
protected void updateRecentsPanel() {
- super.updateRecentsPanel();
+ super.updateRecentsPanel(R.layout.system_bar_recent_panel);
mRecentsPanel.setStatusBarView(mStatusBarView);
}