Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit becf5e30 authored by Selim Cinek's avatar Selim Cinek
Browse files

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
parent 1584609f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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) {
+3 −3
Original line number Diff line number Diff line
@@ -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),