Closed Bug 1946404 Opened 1 year ago Closed 1 year ago

Add manual sytem insets handling

Categories

(Firefox for Android :: General, enhancement)

All
Android
enhancement

Tracking

()

RESOLVED FIXED
138 Branch
Tracking Status
firefox137 --- wontfix
firefox138 --- verified

People

(Reporter: petru, Assigned: petru)

References

(Depends on 1 open bug)

Details

(Whiteboard: [fxdroid][group3])

Attachments

(5 files, 4 obsolete files)

To support Android 15's edge to edge functionality - bug 1916695
And to improve layout animations when the software keyboard is being shown or hidden - bug 1911042
We should handle ourselves applying and reacting to system and ime insets.

This was initially done in bug 1911042 but later backed out in bug 1933488 after problems were reported in displaying websites.
After the patches from bug 1937785 I think the issues with empty - non-rendered space after opening the keyboard do not reproduce anymore so we should land back the patches from bug 1911042.

Product: GeckoView → Fenix

To get more confidence in landing this work again I ask for support in testing the scenarios from bug 1933488 and bug 1933227 on Android 10+, including on the Oppo device from bug 1933488 comment 15 on the builds from this try (using probably the target.arm64-v8a.apk artifact).

Flags: qe-verify+
Attached video debug_build.mp4

I've tested the scenarios mentioned in the tickets from the previous comment using the debug build provided, and all seems in good order: none of the previous issue could be reproduced and no other issues were observed at this point. Tested with OPPO A15s (Android 10), Samsung Galaxy Note 8 (Android 12) and Lenovo Yoga Tab 11 (Android 12).

Flags: qe-verify+
See Also: → 1937785
Summary: Add manual ssytem insets handling → Add manual sytem insets handling
Assignee: nobody → petru
Status: NEW → ASSIGNED

We are now handling edge to edge ourselves.

This is a workaround for the issue from
https://github.com/material-components/material-components-android/issues/3446
which can be avoided if the parent of the snackbar does not provide MarginLayoutParams.

Attachment #9465927 - Attachment is obsolete: true
Whiteboard: [fxdroid][group3]
Pushed by plingurar@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3355377fb4b1 Use manual handling of system insets r=android-reviewers,mcarare https://hg.mozilla.org/integration/autoland/rev/ac46b0f1f7d3 Remove edge to edge opt out for API 35+ r=android-reviewers,mcarare https://hg.mozilla.org/integration/autoland/rev/83ed17be8e13 Use a ConstraintLayout parent to anchor snackbars r=android-reviewers,mcarare,007
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch

@QA Please help validate that this

  • fixes the issue from bug 1911042 (the bottom toolbars follow the show/hide keyboard animations and do not jump to the final position)
  • does not cause issues with snackbar placements - like seen previously in bug 1932904
  • does not cause issues in web rendering after the keyboard opens - like seen previously in bug 1933488

This should be verified on Android 10 devices, including a OPPO A15s with Android 10 device which previously shown issues.

Flags: qe-verify+
See Also: → 1916695
Regressions: 1950114

Will ask to backout this as it enables bug 1934443 comment 11 to be reproducing.

See Also: → 1934443
Flags: qe-verify+

Backed out as requested by plingurar for enabling rendering issues, pending more investigation.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Considering this as blocked by bug 1938303.

Depends on: 1938303

We are now handling edge to edge ourselves.

This is a workaround for the issue from
https://github.com/material-components/material-components-android/issues/3446
which can be avoided if the parent of the snackbar does not provide MarginLayoutParams.

Target Milestone: 137 Branch → ---

Using these APIs on lower versions of Android on devices from some
manufacturers was shown to lead to bugs in the application from the
inconsistencies of the insets framework of those devices.

Pushed by plingurar@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/76453fe8bc1a Have system insets handling APIs supporting only Android 13+ r=android-reviewers,mcarare https://hg.mozilla.org/integration/autoland/rev/50ed43521a03 Use manual handling of system insets r=android-reviewers,mcarare https://hg.mozilla.org/integration/autoland/rev/682db1ec8722 Remove edge to edge opt out for API 35+ r=android-reviewers,mcarare https://hg.mozilla.org/integration/autoland/rev/1772f74a856d Use a ConstraintLayout parent to anchor snackbars r=android-reviewers,mcarare

@QA Please help validate that this

  • fixes the issue from bug 1911042 (the bottom toolbars follow the show/hide keyboard animations and do not jump to the final position) on Android 13+.
  • does not cause issues with snackbar placements - like seen previously in bug 1932904
  • does not cause issues in web rendering after the keyboard opens - like seen previously in bug 1933488

This should be verified on devices with different versions of Android (below and after Android 13) and different form factors.

Flags: qe-verify+

Verified as fixed in latest Nightly 138.0a1 from 03/21. All 3 scenarios were tested with different pages (web searches, filling forms, using "find in page" on webpages and pdfs) and no issues were observed.
There are no black spaces above/under the toolbar/nav bar and all snackbars displayed throughout the application appear in the correct position.
Tested with the following devices: Google Pixel 8 Pro (Android 15), Nothing Phone (2a) 5G (Android 14), Motorola Moto G30 (Android 12), OPPO A15s (Android 10).

Regressions: 1955723
Flags: qe-verify+
Attachment #9465928 - Attachment is obsolete: true
Attachment #9465929 - Attachment is obsolete: true
Attachment #9465930 - Attachment is obsolete: true
Regressions: 1982174
No longer regressions: 1982174
Regressions: 1993982
Regressions: 1990639
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: