-
Notifications
You must be signed in to change notification settings - Fork 472
For # #11374 - Restore immersive mode #11375
Conversation
This pull request has conflicts when rebasing. Could you fix it @Mugurell? 🙏 |
components/support/ktx/src/main/java/mozilla/components/support/ktx/android/view/Activity.kt
Outdated
Show resolved
Hide resolved
...onents/support/ktx/src/test/java/mozilla/components/support/ktx/android/view/ActivityTest.kt
Outdated
Show resolved
Hide resolved
if (insets.isVisible(statusBars())) { | ||
setAsImmersive() | ||
} | ||
insets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Do we need insets
here? As it doesn't looks as we are using it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the return of windowInsetsListener.
The onApplyWindowInsets
method must return WindowInsets
- https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:core/core/src/main/java/androidx/core/view/OnApplyWindowInsetsListener.java;l=45;drc=cb04420e742501081487e3b18851d5674dc07536
docs/changelog.md
Outdated
@@ -11,6 +11,9 @@ permalink: /changelog/ | |||
* [Gecko](https://github.com/mozilla-mobile/android-components/blob/main/buildSrc/src/main/java/Gecko.kt) | |||
* [Configuration](https://github.com/mozilla-mobile/android-components/blob/main/.config.yml) | |||
|
|||
* **support-ktx** | |||
* 🚒 Bug fixed [issue #11374](https://github.com/mozilla-mobile/android-components/issues/11374) - Restore immersive mode after interacting with other Windows. Handle this internally without clients having to pass a OnWindowFocusChangeListener. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think we should mention that we have a breaking change on enterToImmersiveMode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Will update!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a couple of comments apart from them, the PR looks good!
f771c84
to
563780f
Compare
…stener Previously we'd allow a listener being passed in and we'd hope it will correctly handle restoring immersive mode. Now we are handling focus changes and restoring immersive mode on ourselves also allowing for a simpler public API.
563780f
to
6a54655
Compare
This was an issue not reproducing on all devices.
Added a new insets listener to know when they change and set again immersive mode for the fullscreen Activity. (same as Chrome uses)
Handle focus changes internally to guarantee that these events will also restore immersive mode whereas previously clients could pass any focus listener even one not knowing to restore the immersive mode.
StatusBarShowingForFullscreenVideo.mp4
StatusBarHidingForFullscreenVideo.mp4
Pull Request checklist
After merge