Skip to content

Commit becf5e3

Browse files
author
Selim Cinek
committed
Fixed a ordering bug with the notification shade
The dismiss view was not always guaranteed to be on the bottom, which could lead to a weird hole. Bug: 16900568 Change-Id: Ib46ec0011dcdd47a8f678b5e3f9756f6a128f286
1 parent 1584609 commit becf5e3

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,8 +1397,8 @@ protected void updateRowStates() {
13971397

13981398
mStackScroller.changeViewPosition(mKeyguardIconOverflowContainer,
13991399
mStackScroller.getChildCount() - 3);
1400-
mStackScroller.changeViewPosition(mDismissView, mStackScroller.getChildCount() - 2);
1401-
mStackScroller.changeViewPosition(mEmptyShadeView, mStackScroller.getChildCount() - 1);
1400+
mStackScroller.changeViewPosition(mEmptyShadeView, mStackScroller.getChildCount() - 2);
1401+
mStackScroller.changeViewPosition(mDismissView, mStackScroller.getChildCount() - 1);
14021402
}
14031403

14041404
private boolean shouldShowOnKeyguard(StatusBarNotification sbn) {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,9 @@ public boolean onTouch(View v, MotionEvent event) {
690690
SpeedBumpView speedBump = (SpeedBumpView) LayoutInflater.from(mContext).inflate(
691691
R.layout.status_bar_notification_speed_bump, mStackScroller, false);
692692
mStackScroller.setSpeedBumpView(speedBump);
693+
mEmptyShadeView = (EmptyShadeView) LayoutInflater.from(mContext).inflate(
694+
R.layout.status_bar_no_notifications, mStackScroller, false);
695+
mStackScroller.setEmptyShadeView(mEmptyShadeView);
693696
mDismissView = (DismissView) LayoutInflater.from(mContext).inflate(
694697
R.layout.status_bar_notification_dismiss_all, mStackScroller, false);
695698
mDismissView.setOnButtonClickListener(new View.OnClickListener() {
@@ -699,9 +702,6 @@ public void onClick(View v) {
699702
}
700703
});
701704
mStackScroller.setDismissView(mDismissView);
702-
mEmptyShadeView = (EmptyShadeView) LayoutInflater.from(mContext).inflate(
703-
R.layout.status_bar_no_notifications, mStackScroller, false);
704-
mStackScroller.setEmptyShadeView(mEmptyShadeView);
705705
mExpandedContents = mStackScroller;
706706

707707
mScrimController = new ScrimController(mStatusBarWindow.findViewById(R.id.scrim_behind),

0 commit comments

Comments
 (0)