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

Commit 27716724 authored by shawnlin's avatar shawnlin
Browse files

Fixed notification background shifted in landscape

Using getLocationInWindow() will cause an extra distance(from 0 to the
left of the NotificationStackScrollLayout) to the left
bound of the background.

Remove getLocationInWindow() to fix it.

Fixes: 130502182
Test: manual - swipe an notification in landscape
Change-Id: I8f12a71a6820df1a1e26d954d5af95eededfb685
parent 1d485405
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2479,9 +2479,8 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
     */
    @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
    private void updateBackgroundBounds() {
        getLocationInWindow(mTempInt2);
        int left = mTempInt2[0] + mSidePaddings;
        int right = mTempInt2[0] + getWidth() - mSidePaddings;
        int left = mSidePaddings;
        int right = getWidth() - mSidePaddings;
        for (NotificationSection section : mSections) {
            section.getBounds().left = left;
            section.getBounds().right = right;