Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 799c9074 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Forward back key events when no top onBackInvokedCallback registered." into main

parents c009172c 7700039a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -7729,7 +7729,8 @@ public final class ViewRootImpl implements ViewParent,
                    }
                }
            }
            if (keyEvent.getAction() == KeyEvent.ACTION_UP) {
            // Do not cancel the keyEvent if no callback can handle the back event.
            if (topCallback != null && keyEvent.getAction() == KeyEvent.ACTION_UP) {
                // forward a cancelled event so that following stages cancel their back logic
                keyEvent.cancel();
            }