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
This commit is contained in:
Selim Cinek
2014-08-12 14:29:18 +02:00
parent 1584609f42
commit becf5e30ed
2 changed files with 5 additions and 5 deletions

View File

@@ -1397,8 +1397,8 @@ public abstract class BaseStatusBar extends SystemUI implements
mStackScroller.changeViewPosition(mKeyguardIconOverflowContainer,
mStackScroller.getChildCount() - 3);
mStackScroller.changeViewPosition(mDismissView, mStackScroller.getChildCount() - 2);
mStackScroller.changeViewPosition(mEmptyShadeView, mStackScroller.getChildCount() - 1);
mStackScroller.changeViewPosition(mEmptyShadeView, mStackScroller.getChildCount() - 2);
mStackScroller.changeViewPosition(mDismissView, mStackScroller.getChildCount() - 1);
}
private boolean shouldShowOnKeyguard(StatusBarNotification sbn) {

View File

@@ -690,6 +690,9 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
SpeedBumpView speedBump = (SpeedBumpView) LayoutInflater.from(mContext).inflate(
R.layout.status_bar_notification_speed_bump, mStackScroller, false);
mStackScroller.setSpeedBumpView(speedBump);
mEmptyShadeView = (EmptyShadeView) LayoutInflater.from(mContext).inflate(
R.layout.status_bar_no_notifications, mStackScroller, false);
mStackScroller.setEmptyShadeView(mEmptyShadeView);
mDismissView = (DismissView) LayoutInflater.from(mContext).inflate(
R.layout.status_bar_notification_dismiss_all, mStackScroller, false);
mDismissView.setOnButtonClickListener(new View.OnClickListener() {
@@ -699,9 +702,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
}
});
mStackScroller.setDismissView(mDismissView);
mEmptyShadeView = (EmptyShadeView) LayoutInflater.from(mContext).inflate(
R.layout.status_bar_no_notifications, mStackScroller, false);
mStackScroller.setEmptyShadeView(mEmptyShadeView);
mExpandedContents = mStackScroller;
mScrimController = new ScrimController(mStatusBarWindow.findViewById(R.id.scrim_behind),