Closed Bug 1944370 Opened 10 months ago Closed 10 months ago

UserInteractionOnBackPressedCallback handler should break its loop when the event is handled true

Categories

(Firefox for Android :: Homepage, defect)

All
Android
defect

Tracking

()

VERIFIED FIXED
137 Branch
Tracking Status
firefox137 --- verified

People

(Reporter: bob+bmo, Assigned: bob+bmo)

References

Details

Attachments

(1 file)

Bug 1921125 updated back handling to use new AndroidX APIs and also extracted some handling from HomeActivity into UserInteractionOnBackPressedCallback. In the process, it looks like the original early return from the loop calling fragments/handlers was dropped, resulting in all fragments being called even if an earlier one handled the event already. The doc-comment on UserInteractionHandler.onBackPressed also suggests the old early-break behaviour was correct.

I can't find any visible breakage from this change; in all my tests only a single fragment exists so there's never more than one loop iteration. Still seems like it'd be a good idea to either match old behaviour and doc-comment or at least adjust the comment to accurately describe new behaviour.

See Also: → 1921125, 1932300
Assignee: nobody → bob+bmo
Status: NEW → ASSIGNED
Pushed by plingurar@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9d6c1cd16490 Break out of UserInteractionOnBackPressedCallback loop when event is handled r=android-reviewers,petru
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch

@ QA: We refactored the code and need help validating that nothing changed in back handling on Android 14+ - navigating between screens / closing features like the qr scanner / find in page, etc. Thank you!

Flags: qe-verify+

Verified on the latest Fenix nightly 137.0a1 with a Google Pixel 6 (Android 15), and a Samsung Galaxy S24 (Android 14), that nothing changed in back-handling.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: