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

Commit 33d4614d authored by Selim Cinek's avatar Selim Cinek
Browse files

Removed notification top padding

Moving more to fullbleed

Change-Id: I28e52963315bbec37819a355dc3f198431e9daee
parent ca85ef85
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -62,8 +62,7 @@
                <View
                    android:id="@+id/reserve_notification_space"
                    android:layout_height="@dimen/min_stack_height"
                    android:layout_width="match_parent"
                    android:layout_marginTop="@dimen/notifications_top_padding" />
                    android:layout_width="match_parent" />
            </LinearLayout>
        </com.android.systemui.statusbar.phone.ObservableScrollView>

+0 −2
Original line number Diff line number Diff line
@@ -325,8 +325,6 @@
    <!-- Falsing threshold used when dismissing notifications from the lockscreen. -->
    <dimen name="swipe_helper_falsing_threshold">70dp</dimen>

    <dimen name="notifications_top_padding">4dp</dimen>

    <!-- Minimum distance the user has to drag down to go to the full shade. -->
    <dimen name="keyguard_drag_down_min_distance">100dp</dimen>

+1 −9
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ public class HeadsUpTouchHelper implements Gefingerpoken {
    private boolean mCollapseSnoozes;
    private NotificationPanelView mPanel;
    private ExpandableNotificationRow mPickedChild;
    private final int mNotificationsTopPadding;

    public HeadsUpTouchHelper(HeadsUpManager headsUpManager,
            NotificationStackScrollLayout stackScroller,
@@ -54,8 +53,6 @@ public class HeadsUpTouchHelper implements Gefingerpoken {
        Context context = stackScroller.getContext();
        final ViewConfiguration configuration = ViewConfiguration.get(context);
        mTouchSlop = configuration.getScaledTouchSlop();
        mNotificationsTopPadding = context.getResources()
                .getDimensionPixelSize(R.dimen.notifications_top_padding);
    }

    public boolean isTrackingHeadsUp() {
@@ -80,10 +77,6 @@ public class HeadsUpTouchHelper implements Gefingerpoken {
                mInitialTouchX = x;
                setTrackingHeadsUp(false);
                ExpandableView child = mStackScroller.getChildAtRawPosition(x, y);
                if (child == null && y < mNotificationsTopPadding) {
                    // We should also allow drags from the margin above the heads up
                    child = mStackScroller.getChildAtRawPosition(x, y + mNotificationsTopPadding);
                }
                mTouchingHeadsUpView = false;
                if (child instanceof ExpandableNotificationRow) {
                    mPickedChild = (ExpandableNotificationRow) child;
@@ -113,8 +106,7 @@ public class HeadsUpTouchHelper implements Gefingerpoken {
                    mHeadsUpManager.unpinAll();
                    mPanel.setPanelScrimMinFraction((float) expandedHeight
                            / mPanel.getMaxPanelHeight());
                    mPanel.startExpandMotion(x, y, true /* startTracking */, expandedHeight
                            + mNotificationsTopPadding);
                    mPanel.startExpandMotion(x, y, true /* startTracking */, expandedHeight);
                    mPanel.clearNotificattonEffects();
                    return true;
                }
+6 −12
Original line number Diff line number Diff line
@@ -104,7 +104,6 @@ public class NotificationPanelView extends PanelView implements
    private View mQsNavbarScrim;
    private NotificationsQuickSettingsContainer mNotificationContainerParent;
    private NotificationStackScrollLayout mNotificationStackScroller;
    private int mNotificationTopPadding;
    private boolean mAnimateNextTopPaddingChange;

    private int mTrackingPointer;
@@ -281,8 +280,6 @@ public class NotificationPanelView extends PanelView implements
    @Override
    protected void loadDimens() {
        super.loadDimens();
        mNotificationTopPadding = getResources().getDimensionPixelSize(
                R.dimen.notifications_top_padding);
        mFlingAnimationUtils = new FlingAnimationUtils(getContext(), 0.4f);
        mStatusBarMinHeight = getResources().getDimensionPixelSize(
                com.android.internal.R.dimen.status_bar_height);
@@ -400,8 +397,8 @@ public class NotificationPanelView extends PanelView implements
        if (mStatusBarState != StatusBarState.KEYGUARD) {
            int bottom = mHeader.getCollapsedHeight();
            stackScrollerPadding = mStatusBarState == StatusBarState.SHADE
                    ? bottom + mQsPeekHeight + mNotificationTopPadding
                    : mKeyguardStatusBar.getHeight() + mNotificationTopPadding;
                    ? bottom + mQsPeekHeight
                    : mKeyguardStatusBar.getHeight();
            mTopPaddingAdjustment = 0;
        } else {
            mClockPositionAlgorithm.setup(
@@ -1380,8 +1377,7 @@ public class NotificationPanelView extends PanelView implements
            // on Keyguard, maxQs denotes the top padding from the quick settings panel. We need to
            // take the maximum and linearly interpolate with the panel expansion for a nice motion.
            int maxNotifications = mClockPositionResult.stackScrollerPadding
                    - mClockPositionResult.stackScrollerPaddingAdjustment
                    - mNotificationTopPadding;
                    - mClockPositionResult.stackScrollerPaddingAdjustment;
            int maxQs = getTempQsMaxExpansion();
            int max = mStatusBarState == StatusBarState.KEYGUARD
                    ? Math.max(maxNotifications, maxQs)
@@ -1395,7 +1391,7 @@ public class NotificationPanelView extends PanelView implements
            // We can only do the smoother transition on Keyguard when we also are not collapsing
            // from a scrolled quick settings.
            return interpolate(getQsExpansionFraction(),
                    mNotificationStackScroller.getIntrinsicPadding() - mNotificationTopPadding,
                    mNotificationStackScroller.getIntrinsicPadding(),
                    mQsMaxExpansionHeight);
        } else {
            return mQsExpansionHeight;
@@ -1625,15 +1621,13 @@ public class NotificationPanelView extends PanelView implements
            maxQsHeight = (int) mQsSizeChangeAnimator.getAnimatedValue();
        }
        float totalHeight = Math.max(
                maxQsHeight + mNotificationStackScroller.getNotificationTopPadding(),
                mStatusBarState == StatusBarState.KEYGUARD
                maxQsHeight, mStatusBarState == StatusBarState.KEYGUARD
                        ? mClockPositionResult.stackScrollerPadding - mTopPaddingAdjustment
                        : 0)
                + notificationHeight;
        if (totalHeight > mNotificationStackScroller.getHeight()) {
            float fullyCollapsedHeight = maxQsHeight
                    + mNotificationStackScroller.getMinStackHeight()
                    + mNotificationStackScroller.getNotificationTopPadding()
                    - getScrollViewScrollY();
            totalHeight = Math.max(fullyCollapsedHeight, mNotificationStackScroller.getHeight());
        }
@@ -1727,7 +1721,7 @@ public class NotificationPanelView extends PanelView implements
        float translation = stackTranslation / HEADER_RUBBERBAND_FACTOR;
        if (mHeadsUpManager.hasPinnedHeadsUp() || mIsExpansionFromHeadsUp) {
            translation = mNotificationStackScroller.getTopPadding() + stackTranslation
                    - mNotificationTopPadding - mQsMinExpansionHeight;
                    - mQsMinExpansionHeight;
        }
        return Math.min(0, translation);
    }
+1 −4
Original line number Diff line number Diff line
@@ -84,7 +84,6 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL

    private final View mStatusBarWindowView;
    private final int mStatusBarHeight;
    private final int mNotificationsTopPadding;
    private final Context mContext;
    private final NotificationGroupManager mGroupManager;
    private PhoneStatusBar mBar;
@@ -138,8 +137,6 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
        mGroupManager = groupManager;
        mStatusBarHeight = resources.getDimensionPixelSize(
                com.android.internal.R.dimen.status_bar_height);
        mNotificationsTopPadding = context.getResources()
                .getDimensionPixelSize(R.dimen.notifications_top_padding);
    }

    private void updateTouchableRegionListener() {
@@ -399,7 +396,7 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
            }

            info.setTouchableInsets(ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_REGION);
            info.touchableRegion.set(minX, 0, maxX, maxY + mNotificationsTopPadding);
            info.touchableRegion.set(minX, 0, maxX, maxY);
        } else if (mHeadsUpGoingAway || mWaitingOnCollapseWhenGoingAway) {
            info.setTouchableInsets(ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_REGION);
            info.touchableRegion.set(0, 0, mStatusBarWindowView.getWidth(), mStatusBarHeight);
Loading