From becf5e30edbc8e00928bd1d473fadf2bb456baec Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Tue, 12 Aug 2014 14:29:18 +0200 Subject: [PATCH] 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 --- .../src/com/android/systemui/statusbar/BaseStatusBar.java | 4 ++-- .../android/systemui/statusbar/phone/PhoneStatusBar.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index 8319f4103f7bb..2d1095be2162c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -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) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index a2f893157d4e7..09603d7707093 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -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),