Fixing FakeMotionEvent
Using spy turned out to introduce another problem when native MotionEvent is released from memory - which happens later, during other test runs when destructor of native MotionEvent is called. Solution seems to be to create mock with delegation of all calls to the original object so we don't copy all fields from original object, just act as a proxy for it. Fixes: 351784601 Flag: EXEMPT test fix Test: Add Thread.sleep() and System.gc() several times at the end of the test using FakeMotionEvent and see it doesn't crash with native error Change-Id: Icf39158d5a7f397ca50d271387058127190bf2eb
Loading
Please register or sign in to comment