Skip to content

Commit 8e18dc7

Browse files
committed
Black out the status bar when the shade comes down.
Also move the shade up and forward to overlap the (now empty) status bar. As a side effect, DISABLE_SYSTEM_INFO now works for phones. Bug: 6418617 Change-Id: I3b129e4bb26d3aba55403bf03baf8f4c8ad0ff46
1 parent 8bbbd3f commit 8e18dc7

File tree

5 files changed

+24
-16
lines changed

5 files changed

+24
-16
lines changed

packages/SystemUI/res/layout-sw600dp/super_status_bar.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
android:fitsSystemWindows="true"
2727
>
2828

29+
<include layout="@layout/status_bar"
30+
android:layout_width="match_parent"
31+
android:layout_height="@*android:dimen/status_bar_height"
32+
/>
33+
2934
<include layout="@layout/status_bar_expanded"
3035
android:layout_width="@dimen/notification_panel_width"
3136
android:layout_height="match_parent"
3237
android:layout_gravity="center_horizontal|top"
3338
/>
3439

35-
<include layout="@layout/status_bar"
36-
android:layout_width="match_parent"
37-
android:layout_height="@*android:dimen/status_bar_height"
38-
/>
39-
4040
</com.android.systemui.statusbar.phone.StatusBarWindowView>

packages/SystemUI/res/layout/super_status_bar.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
android:fitsSystemWindows="true"
2727
>
2828

29-
<include layout="@layout/status_bar_expanded"
29+
<include layout="@layout/status_bar"
3030
android:layout_width="match_parent"
31-
android:layout_height="match_parent"
31+
android:layout_height="@*android:dimen/status_bar_height"
3232
/>
3333

34-
<include layout="@layout/status_bar"
34+
<include layout="@layout/status_bar_expanded"
3535
android:layout_width="match_parent"
36-
android:layout_height="@*android:dimen/status_bar_height"
36+
android:layout_height="match_parent"
3737
/>
3838

3939
</com.android.systemui.statusbar.phone.StatusBarWindowView>

packages/SystemUI/res/values-sw600dp/dimens.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
<!-- Height of search panel including navigation bar height -->
3434
<dimen name="navbar_search_panel_height">300dip</dimen>
3535

36-
<!-- Extra space above the clock in the panel; on this device, zero -->
37-
<dimen name="notification_panel_header_padding_top">0dp</dimen>
38-
3936
<!-- Size of application thumbnail -->
4037
<dimen name="status_bar_recents_thumbnail_width">200dp</dimen>
4138
<dimen name="status_bar_recents_thumbnail_height">177dp</dimen>

packages/SystemUI/res/values/dimens.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,10 @@
132132
<!-- Height of the notification panel header bar -->
133133
<dimen name="notification_panel_header_height">48dp</dimen>
134134

135-
<!-- Height of the notification panel header bar -->
136-
<dimen name="notification_panel_padding_top">@*android:dimen/status_bar_height</dimen>
135+
<!-- Extra space above the panel -->
136+
<dimen name="notification_panel_padding_top">4dp</dimen>
137137

138-
<!-- Extra space above the clock in the panel; half of (notification_panel_header_height - 32) -->
138+
<!-- Extra space above the clock in the panel -->
139139
<dimen name="notification_panel_header_padding_top">0dp</dimen>
140140

141141
<!-- Layout parameters for the notification panel -->

packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,9 @@ public boolean onTouch(View v, MotionEvent event) {
301301
return true;
302302
}
303303
});
304+
mNotificationPanel.setSystemUiVisibility(
305+
View.STATUS_BAR_DISABLE_NOTIFICATION_TICKER
306+
| View.STATUS_BAR_DISABLE_SYSTEM_INFO);
304307

305308
if (!ActivityManager.isHighEndGfx(mDisplay)) {
306309
mStatusBarWindow.setBackground(null);
@@ -336,7 +339,6 @@ public boolean onTouch(View v, MotionEvent event) {
336339
mPixelFormat = PixelFormat.OPAQUE;
337340
mStatusIcons = (LinearLayout)mStatusBarView.findViewById(R.id.statusIcons);
338341
mNotificationIcons = (IconMerger)mStatusBarView.findViewById(R.id.notificationIcons);
339-
mMoreIcon = mStatusBarView.findViewById(R.id.moreIcon);
340342
mNotificationIcons.setOverflowIndicator(mMoreIcon);
341343
mIcons = (LinearLayout)mStatusBarView.findViewById(R.id.icons);
342344
mTickerView = mStatusBarView.findViewById(R.id.ticker);
@@ -884,6 +886,15 @@ public void disable(int state) {
884886
flagdbg.append(((diff & StatusBarManager.DISABLE_CLOCK) != 0) ? "* " : " ");
885887
flagdbg.append(">");
886888
Slog.d(TAG, flagdbg.toString());
889+
890+
if ((diff & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) {
891+
mIcons.animate().cancel();
892+
if ((state & StatusBarManager.DISABLE_SYSTEM_INFO) != 0) {
893+
mIcons.animate().alpha(0f).setStartDelay(100).setDuration(200).start();
894+
} else {
895+
mIcons.animate().alpha(1f).setStartDelay(0).setDuration(300).start();
896+
}
897+
}
887898

888899
if ((diff & StatusBarManager.DISABLE_CLOCK) != 0) {
889900
boolean show = (state & StatusBarManager.DISABLE_CLOCK) == 0;

0 commit comments

Comments
 (0)