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

Commit 1a8788d9 authored by Beverly Tai's avatar Beverly Tai Committed by Automerger Merge Worker
Browse files

Merge "Check unmagnified coordinates to close notif guts" into rvc-dev am:...

Merge "Check unmagnified coordinates to close notif guts" into rvc-dev am: b42c22fe am: 322f3962

Change-Id: I5e949cfd9f2d7a1509f5d7b000adf5f2997db0fb
parents 6d84a452 322f3962
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -426,8 +426,8 @@ class NotificationSwipeHelper extends SwipeHelper implements NotificationSwipeAc
        final int height = (view instanceof ExpandableView)
                ? ((ExpandableView) view).getActualHeight()
                : view.getHeight();
        final int rx = (int) ev.getRawX();
        final int ry = (int) ev.getRawY();
        final int rx = (int) ev.getX();
        final int ry = (int) ev.getY();
        int[] temp = new int[2];
        view.getLocationOnScreen(temp);
        final int x = temp[0];
+6 −6
Original line number Diff line number Diff line
@@ -436,8 +436,8 @@ public class NotificationSwipeHelperTest extends SysuiTestCase {
        assertEquals("returns false when view is null", false,
                NotificationSwipeHelper.isTouchInView(mEvent, null));

        doReturn(5f).when(mEvent).getRawX();
        doReturn(10f).when(mEvent).getRawY();
        doReturn(5f).when(mEvent).getX();
        doReturn(10f).when(mEvent).getY();

        doReturn(20).when(mView).getWidth();
        doReturn(20).when(mView).getHeight();
@@ -453,7 +453,7 @@ public class NotificationSwipeHelperTest extends SysuiTestCase {
        assertTrue("Touch is within the view",
                mSwipeHelper.isTouchInView(mEvent, mView));

        doReturn(50f).when(mEvent).getRawX();
        doReturn(50f).when(mEvent).getX();

        assertFalse("Touch is not within the view",
                mSwipeHelper.isTouchInView(mEvent, mView));
@@ -464,8 +464,8 @@ public class NotificationSwipeHelperTest extends SysuiTestCase {
        assertEquals("returns false when view is null", false,
                NotificationSwipeHelper.isTouchInView(mEvent, null));

        doReturn(5f).when(mEvent).getRawX();
        doReturn(10f).when(mEvent).getRawY();
        doReturn(5f).when(mEvent).getX();
        doReturn(10f).when(mEvent).getY();

        doReturn(20).when(mNotificationRow).getWidth();
        doReturn(20).when(mNotificationRow).getActualHeight();
@@ -481,7 +481,7 @@ public class NotificationSwipeHelperTest extends SysuiTestCase {
        assertTrue("Touch is within the view",
                mSwipeHelper.isTouchInView(mEvent, mNotificationRow));

        doReturn(50f).when(mEvent).getRawX();
        doReturn(50f).when(mEvent).getX();

        assertFalse("Touch is not within the view",
                mSwipeHelper.isTouchInView(mEvent, mNotificationRow));