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

Commit c0110ac4 authored by Johannes Gallmann's avatar Johannes Gallmann Committed by Android (Google) Code Review
Browse files

Merge "Fix onUserInteraction not called with 3-button-nav and...

Merge "Fix onUserInteraction not called with 3-button-nav and enableOnBackInvokedCallback=true" into main
parents 44d69cbf b523bc81
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -7547,7 +7547,6 @@ public final class ViewRootImpl implements ViewParent,
                            animationCallback.onBackCancelled();
                        } else {
                            topCallback.onBackInvoked();
                            return FINISH_HANDLED;
                        }
                        break;
                }
@@ -7555,14 +7554,16 @@ public final class ViewRootImpl implements ViewParent,
                if (keyEvent.getAction() == KeyEvent.ACTION_UP) {
                    if (!keyEvent.isCanceled()) {
                        topCallback.onBackInvoked();
                        return FINISH_HANDLED;
                    } else {
                        Log.d(mTag, "Skip onBackInvoked(), reason: keyEvent.isCanceled=true");
                    }
                }
            }
            return FINISH_NOT_HANDLED;
            if (keyEvent.getAction() == KeyEvent.ACTION_UP) {
                // forward a cancelled event so that following stages cancel their back logic
                keyEvent.cancel();
            }
            return FORWARD;
        }
        @Override