Don't forward KEYCODE_BACK events to app
On back navigation Activity#onUserInteraction should get called. So far this has been ensured by sending KEYCODE_BACK events to the activity, but marked as cancelled when enableOnBackInvokedCallback=true. This meant that app code also saw these cancelled KeyEvents in Activity#dispatchKeyEvent. This CL stops this practice and registers an observer callback from Activity.java instead to get notified on back navigation. Bug: 436871339 Test: OnBackInvokedCallbackGestureTest Flag: com.android.window.flags.predictive_back_stop_keycode_back_forwarding Change-Id: Ibd20ed89d1e6086a4404bb7368160a81192e9576
Loading
Please register or sign in to comment