Call initTransitionEndpoints in constructor

Before, the soonest we initTransitionEndpoints() is in
onRecentsAnimationStart(), which might be too late if launcher was
killed. (In that case, the gesture might end before we ever get
onRecentsAnimationStart(), and thus will never consider the distance
traveled great enough to trigger recents since we don't have endpoints.)

Bug: 129723135
Change-Id: I349f62244aaba8369926b14f90acd994fd40a93a
This commit is contained in:
Tony Wickham
2019-04-24 17:19:07 -07:00
parent b0c81fc031
commit 5e58b447b0
@@ -276,6 +276,9 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity>
mMode = SysUINavigationMode.getMode(context);
initStateCallbacks();
DeviceProfile dp = InvariantDeviceProfile.INSTANCE.get(mContext).getDeviceProfile(mContext);
initTransitionEndpoints(dp);
}
private void initStateCallbacks() {