Loading packages/SystemUI/src/com/android/systemui/classifier/FalsingDataProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ public class FalsingDataProvider { private TimeLimitedMotionEventBuffer mRecentMotionEvents = new TimeLimitedMotionEventBuffer(MOTION_EVENT_AGE_MS); private List<MotionEvent> mPriorMotionEvents; private List<MotionEvent> mPriorMotionEvents = new ArrayList<>(); private boolean mDirty = true; Loading packages/SystemUI/tests/src/com/android/systemui/classifier/FalsingDataProviderTest.java +7 −0 Original line number Diff line number Diff line Loading @@ -290,4 +290,11 @@ public class FalsingDataProviderTest extends ClassifierTest { mDataProvider.onMotionEvent(appendDownEvent(0, 200)); verify(listener).onGestureFinalized(100); } @Test public void test_GetPriorEventsEarly() { // Ensure that if we ask for prior events before any events were added, we at least get // an empty array. assertThat(mDataProvider.getPriorMotionEvents()).isNotNull(); } } Loading
packages/SystemUI/src/com/android/systemui/classifier/FalsingDataProvider.java +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ public class FalsingDataProvider { private TimeLimitedMotionEventBuffer mRecentMotionEvents = new TimeLimitedMotionEventBuffer(MOTION_EVENT_AGE_MS); private List<MotionEvent> mPriorMotionEvents; private List<MotionEvent> mPriorMotionEvents = new ArrayList<>(); private boolean mDirty = true; Loading
packages/SystemUI/tests/src/com/android/systemui/classifier/FalsingDataProviderTest.java +7 −0 Original line number Diff line number Diff line Loading @@ -290,4 +290,11 @@ public class FalsingDataProviderTest extends ClassifierTest { mDataProvider.onMotionEvent(appendDownEvent(0, 200)); verify(listener).onGestureFinalized(100); } @Test public void test_GetPriorEventsEarly() { // Ensure that if we ask for prior events before any events were added, we at least get // an empty array. assertThat(mDataProvider.getPriorMotionEvents()).isNotNull(); } }