Merge "Fix snooze guts disappearing in split shade" into sc-v2-dev

This commit is contained in:
Jeff DeCew
2021-11-22 02:23:29 +00:00
committed by Android (Google) Code Review
2 changed files with 8 additions and 8 deletions

View File

@@ -444,8 +444,8 @@ class NotificationSwipeHelper extends SwipeHelper implements NotificationSwipeAc
final int height = (view instanceof ExpandableView)
? ((ExpandableView) view).getActualHeight()
: view.getHeight();
final int rx = (int) ev.getX();
final int ry = (int) ev.getY();
final int rx = (int) ev.getRawX();
final int ry = (int) ev.getRawY();
int[] temp = new int[2];
view.getLocationOnScreen(temp);
final int x = temp[0];

View File

@@ -438,8 +438,8 @@ public class NotificationSwipeHelperTest extends SysuiTestCase {
assertEquals("returns false when view is null", false,
NotificationSwipeHelper.isTouchInView(mEvent, null));
doReturn(5f).when(mEvent).getX();
doReturn(10f).when(mEvent).getY();
doReturn(5f).when(mEvent).getRawX();
doReturn(10f).when(mEvent).getRawY();
doReturn(20).when(mView).getWidth();
doReturn(20).when(mView).getHeight();
@@ -455,7 +455,7 @@ public class NotificationSwipeHelperTest extends SysuiTestCase {
assertTrue("Touch is within the view",
mSwipeHelper.isTouchInView(mEvent, mView));
doReturn(50f).when(mEvent).getX();
doReturn(50f).when(mEvent).getRawX();
assertFalse("Touch is not within the view",
mSwipeHelper.isTouchInView(mEvent, mView));
@@ -466,8 +466,8 @@ public class NotificationSwipeHelperTest extends SysuiTestCase {
assertEquals("returns false when view is null", false,
NotificationSwipeHelper.isTouchInView(mEvent, null));
doReturn(5f).when(mEvent).getX();
doReturn(10f).when(mEvent).getY();
doReturn(5f).when(mEvent).getRawX();
doReturn(10f).when(mEvent).getRawY();
doReturn(20).when(mNotificationRow).getWidth();
doReturn(20).when(mNotificationRow).getActualHeight();
@@ -483,7 +483,7 @@ public class NotificationSwipeHelperTest extends SysuiTestCase {
assertTrue("Touch is within the view",
mSwipeHelper.isTouchInView(mEvent, mNotificationRow));
doReturn(50f).when(mEvent).getX();
doReturn(50f).when(mEvent).getRawX();
assertFalse("Touch is not within the view",
mSwipeHelper.isTouchInView(mEvent, mNotificationRow));