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

Commit 87db3859 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Android (Google) Code Review
Browse files

Merge "Fix QuickSettings header state on Keyguard."

parents 54257654 bc5f496e
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -414,11 +414,8 @@ public class NotificationPanelView extends PanelView implements
        if (!mQsExpansionEnabled) {
            return false;
        }
        View headerView = mStatusBar.getBarState() == StatusBarState.KEYGUARD && !mQsExpanded
                ? mKeyguardStatusView
                : mHeader;
        boolean onHeader = x >= headerView.getLeft() && x <= headerView.getRight()
                && y >= headerView.getTop() && y <= headerView.getBottom();
        boolean onHeader = x >= mHeader.getLeft() && x <= mHeader.getRight()
                && y >= mHeader.getTop() && y <= mHeader.getBottom();
        if (mQsExpanded) {
            return onHeader || (mScrollView.isScrolledToBottom() && yDiff < 0);
        } else {
+7 −5
Original line number Diff line number Diff line
@@ -114,10 +114,11 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL
    }

    private void updateHeights() {
        boolean onKeyguardAndCollapsed = mKeyguardShowing && !mExpanded;
        int height;
        if (mExpanded) {
            height = mExpandedHeight;
        } else if (mKeyguardShowing) {
        } else if (onKeyguardAndCollapsed) {
            height = mKeyguardHeight;
        } else {
            height = mCollapsedHeight;
@@ -127,7 +128,7 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL
            lp.height = height;
            setLayoutParams(lp);
        }
        int systemIconsContainerHeight = mKeyguardShowing ? mKeyguardHeight : mCollapsedHeight;
        int systemIconsContainerHeight = onKeyguardAndCollapsed ? mKeyguardHeight : mCollapsedHeight;
        lp = mSystemIconsContainer.getLayoutParams();
        if (lp.height != systemIconsContainerHeight) {
            lp.height = systemIconsContainerHeight;
@@ -150,9 +151,10 @@ public class StatusBarHeaderView extends RelativeLayout implements View.OnClickL
    }

    private void updateVisibilities() {
        mBackground.setVisibility(mKeyguardShowing ? View.INVISIBLE : View.VISIBLE);
        mDateTime.setVisibility(mKeyguardShowing ? View.INVISIBLE : View.VISIBLE);
        mKeyguardCarrierText.setVisibility(mKeyguardShowing ? View.VISIBLE : View.GONE);
        boolean onKeyguardAndCollapsed = mKeyguardShowing && !mExpanded;
        mBackground.setVisibility(onKeyguardAndCollapsed ? View.INVISIBLE : View.VISIBLE);
        mDateTime.setVisibility(onKeyguardAndCollapsed ? View.INVISIBLE : View.VISIBLE);
        mKeyguardCarrierText.setVisibility(onKeyguardAndCollapsed ? View.VISIBLE : View.GONE);
        mDate.setVisibility(mExpanded ? View.VISIBLE : View.GONE);
        mSettingsButton.setVisibility(mExpanded ? View.VISIBLE : View.GONE);
        mBrightnessContainer.setVisibility(mExpanded ? View.VISIBLE : View.GONE);