Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Update immersive mode support #11527

Closed
Mugurell opened this issue Jan 12, 2022 · 1 comment
Closed

Update immersive mode support #11527

Mugurell opened this issue Jan 12, 2022 · 1 comment
Assignees

Comments

@Mugurell
Copy link
Contributor

Mugurell commented Jan 12, 2022

As a followup to #11374 and mozilla-mobile/fenix#23132 I saw that the new insets apis seems to have a bug stemming from a race condition in applying them so as an intermittent issue the immersive mode would not get applied.

Opened https://issuetracker.google.com/u/2/issues/214012501 for which seems like a framework bug but in the meantime it seems we can use the older APIs to ensure we get the desired behavior.

┆Issue is synchronized with this Jira Task

@Mugurell Mugurell self-assigned this Jan 12, 2022
Mugurell added a commit to Mugurell/android-components that referenced this issue Jan 12, 2022
…ce they work better

Opened https://issuetracker.google.com/u/2/issues/214012501 for what seems a
bug with the new insets based APIs.
In the meantime we are using the OnSystemUiVisibilityChangeListener since to
know when to restore immersive mode.

Removed the onWindowFocusChangeListener extension property since by having to
offer it through a getter the current implementation would always leak the old
one.
Fenix wasn't using it when this APIs allowed Fenix to pass such a listener and
there was no issue observed so there should be no observable negative impact.
Mugurell added a commit to Mugurell/android-components that referenced this issue Jan 12, 2022
…ce they work better

Opened https://issuetracker.google.com/u/2/issues/214012501 for what seems a
bug with the new insets based APIs.
In the meantime we are using the old OnSystemUiVisibilityChangeListener to
know when to restore immersive mode.

Removed the onWindowFocusChangeListener extension property since by having to
offer it through a getter the current implementation would always leak the old
one.
Fenix wasn't using it when this APIs allowed Fenix to pass such a listener and
there was no issue observed so there should be no observable negative impact.
Mugurell added a commit to Mugurell/android-components that referenced this issue Jan 13, 2022
…ce they work better

Opened https://issuetracker.google.com/u/2/issues/214012501 for what seems a
bug with the new insets based APIs.
In the meantime we are using the old OnSystemUiVisibilityChangeListener to
know when to restore immersive mode.

Removed the onWindowFocusChangeListener extension property since by having to
offer it through a getter the current implementation would always leak the old
one.
Fenix wasn't using it when this APIs allowed Fenix to pass such a listener and
there was no issue observed so there should be no observable negative impact.
Mugurell added a commit to Mugurell/android-components that referenced this issue Jan 14, 2022
…ce they work better

Opened https://issuetracker.google.com/u/2/issues/214012501 for what seems a
bug with the new insets based APIs.
In the meantime we are using the old OnSystemUiVisibilityChangeListener to
know when to restore immersive mode.

Removed the onWindowFocusChangeListener extension property since by having to
offer it through a getter the current implementation would always leak the old
one.
Fenix wasn't using it when this APIs allowed Fenix to pass such a listener and
there was no issue observed so there should be no observable negative impact.
Mugurell added a commit to Mugurell/android-components that referenced this issue Jan 17, 2022
…ncoming insets

There was a race between how insets are applied when entering immersive mode
and enabling immersive mode restore by setting an insets listener which is now
resolved by ensuring the decor view has the time needed to process the incoming
insets, solution recommended on issuetracker
https://issuetracker.google.com/u/2/issues/214012501 .

Removed the onWindowFocusChangeListener extension property since by having to
offer it through a getter the current implementation would always leak the old
one.
Fenix wasn't using it when this APIs allowed Fenix to pass such a listener and
there was no issue observed so there should be no observable negative impact.
mergify bot pushed a commit that referenced this issue Jan 18, 2022
There was a race between how insets are applied when entering immersive mode
and enabling immersive mode restore by setting an insets listener which is now
resolved by ensuring the decor view has the time needed to process the incoming
insets, solution recommended on issuetracker
https://issuetracker.google.com/u/2/issues/214012501 .

Removed the onWindowFocusChangeListener extension property since by having to
offer it through a getter the current implementation would always leak the old
one.
Fenix wasn't using it when this APIs allowed Fenix to pass such a listener and
there was no issue observed so there should be no observable negative impact.
mergify bot pushed a commit that referenced this issue Feb 8, 2022
There was a race between how insets are applied when entering immersive mode
and enabling immersive mode restore by setting an insets listener which is now
resolved by ensuring the decor view has the time needed to process the incoming
insets, solution recommended on issuetracker
https://issuetracker.google.com/u/2/issues/214012501 .

Removed the onWindowFocusChangeListener extension property since by having to
offer it through a getter the current implementation would always leak the old
one.
Fenix wasn't using it when this APIs allowed Fenix to pass such a listener and
there was no issue observed so there should be no observable negative impact.

(cherry picked from commit 6f60a8a)

# Conflicts:
#	docs/changelog.md
Mugurell added a commit that referenced this issue Feb 8, 2022
There was a race between how insets are applied when entering immersive mode
and enabling immersive mode restore by setting an insets listener which is now
resolved by ensuring the decor view has the time needed to process the incoming
insets, solution recommended on issuetracker
https://issuetracker.google.com/u/2/issues/214012501 .

Removed the onWindowFocusChangeListener extension property since by having to
offer it through a getter the current implementation would always leak the old
one.
Fenix wasn't using it when this APIs allowed Fenix to pass such a listener and
there was no issue observed so there should be no observable negative impact.

(cherry picked from commit 6f60a8a)
Amejia481 pushed a commit that referenced this issue Feb 8, 2022
There was a race between how insets are applied when entering immersive mode
and enabling immersive mode restore by setting an insets listener which is now
resolved by ensuring the decor view has the time needed to process the incoming
insets, solution recommended on issuetracker
https://issuetracker.google.com/u/2/issues/214012501 .

Removed the onWindowFocusChangeListener extension property since by having to
offer it through a getter the current implementation would always leak the old
one.
Fenix wasn't using it when this APIs allowed Fenix to pass such a listener and
there was no issue observed so there should be no observable negative impact.

(cherry picked from commit 6f60a8a)
lillabldv added a commit to karmaSearch/android-components that referenced this issue Mar 27, 2022
* commit '0465a6f809adafd5429c230e890e7f4911f0070e': (238 commits)
  Set version to 97.0.13.
  Set version.txt to 97.0.13.
  Update GeckoView (Release) to 97.0.20220304162637.
  Set version to 97.0.12.
  Set version.txt to 97.0.12.
  Update GeckoView (Release) to 97.0.20220216172458.
  For mozilla-mobile#11527 - Allow the decor view time to process the incoming insets
  Set version to 97.0.11.
  Set version.txt to 97.0.11.
  Update GeckoView (Release) to 97.0.20220202182137.
  Set version.txt to 97.0.10.
  Set version to 97.0.10.
  Update GeckoView (Release) to 97.0.20220131171509.
  Uplift Strings from main to releases/97.0 (mozilla-mobile#11583)
  Set version to 97.0.9.
  Set version.txt to 97.0.9.
  Update GeckoView (Beta) to 97.0.20220127193706.
  No issue: Add valid channel set (mozilla-mobile#11622) (mozilla-mobile#11623)
  No issue: Add null as valid code (mozilla-mobile#11614)
  Set version to 97.0.8.
  ...

# Conflicts:
#	.buildconfig.yml
#	buildSrc/src/main/java/Gecko.kt
#	components/browser/errorpages/src/main/res/values-uz/strings.xml
#	components/feature/sitepermissions/src/main/res/values-ur/strings.xml
#	version.txt
@Mugurell
Copy link
Contributor Author

Fix verified in Fenix - mozilla-mobile/fenix#23705

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant