diff options
| author | 2024-07-09 11:54:32 +0000 | |
|---|---|---|
| committer | 2024-07-09 11:54:32 +0000 | |
| commit | 90735ac464be3dc32ec47e495eea094afe51a49c (patch) | |
| tree | 82987cedac2e68639feeca03fd65736b4ae2912f | |
| parent | 86dad492291ef3bb5fc04c41586f9f4af73987cc (diff) | |
| parent | a5cd72625a0ed0d7438197f00955d570c8202cb8 (diff) | |
Merge "Revert "Fix onUserInteraction not called with 3-button-nav and e..."" into main
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 707fa603c2e3..07cbaa9c905f 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -7532,6 +7532,7 @@ public final class ViewRootImpl implements ViewParent, animationCallback.onBackCancelled(); } else { topCallback.onBackInvoked(); + return FINISH_HANDLED; } break; } @@ -7539,16 +7540,14 @@ 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"); } } } - if (keyEvent.getAction() == KeyEvent.ACTION_UP) { - // forward a cancelled event so that following stages cancel their back logic - keyEvent.cancel(); - } - return FORWARD; + + return FINISH_NOT_HANDLED; } @Override |