Skip to content
Commit db78c194 authored by Shan Huang's avatar Shan Huang
Browse files

Pass the values of the MotionEvent instead of the event instance itself

to BackAnimation.

The original MotionEvent instance may have been recycled by the time BackAnimation processes it, since BackAnimation runs in a different thread. This could cause crashes from both Java side and native side, as described in b/233163975#comment11.

We work around this by passing the numerical values that BackAnimation
need instead of the MotionEvent itself.

Test: Swipe back in various scenarios. Make sure back can be triggered.
Try cancel. Make sure back can be cancelled.
Test: atest BackAnimationControllerTest
Bug: 233163975

Change-Id: I4792debc705536b49d1caafcc43e5466941c1d43
Merged-In: I4792debc705536b49d1caafcc43e5466941c1d43
parent 1f9afd72
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment