kennethnym / StarlightLauncher

A search-focused Android launcher
GNU General Public License v3.0
100 stars 7 forks source link

Properly handle gesture navigation #61

Open kennethnym opened 1 year ago

kennethnym commented 1 year ago

From https://android.googlesource.com/platform/packages/apps/Launcher3/+/30ac97d9386736c3322a3277f74523497627b9f5:

When user swipes up to home, Launcher will receive a onNewIntent
callwith a bundle-extra gesture_nav_contract_v1. It will contain
the componentName & UserHandle of the closing app & a callback.
Launcher can use the callback to return the final position where
the app should animate to and an optional surface to be used for
crossFade animation. The surface cleanup can be handled in
onEnterAnimationComplete.

GestureNavContract.java from AOSP contains the logic required to handle gesture navigation.