Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

[Bug]: Orientation lock after launching from external intents from PiP #22471

Closed
czlucius opened this issue Nov 17, 2021 · 9 comments
Closed
Assignees
Labels
b:landscape Landscape bug 🐞 bug Crashes, Something isn't working, .. eng:qa:verified QA Verified needs:triage Issue needs triage qa-triaged Issues triaged by qa S3 Blocks non-critical functionality and a work around exists

Comments

@czlucius
Copy link
Contributor

czlucius commented Nov 17, 2021

Steps to reproduce

  1. Play a video in a tab, in landscape mode
  2. Open it in fullscreen
  3. Use the home button/navigation controls to navigate to the Android home screen, so that the video continues in Picture in Picture mode.
  4. On the home screen, rotate to portrait mode
  5. Launch an app shortcut (long click on Firefox icon and select New Tab or New private tab)
  6. Enter a website into the address bar (e.g. https://mozilla.org)

Expected behaviour

On step 6, the website should open in portrait mode

Actual behaviour

The app rotates to landscape mode, and the user cannot switch to portrait mode even if the phone is in the portrait orientation. The user cannot go back to portrait mode unless he goes to the tab playing the video and exit fullscreen mode.

Device name

Samsung Galaxy S20 FE 5G

Android version

Android 11

Firefox release type

Firefox

Firefox version

94.1.2

Device logs

No response

Additional information

Screen recording below illustrates the issue.

video_2021-11-17_13-29-04.mp4

This is related to #18727, which is already closed

┆Issue is synchronized with this Jira Task

@czlucius czlucius added needs:triage Issue needs triage 🐞 bug Crashes, Something isn't working, .. labels Nov 17, 2021
@SoftVision-LorandJanos
Copy link

Hi @czlucius! Thank you for your report!
I've managed to reproduce the issue you described.

Tested on:

  • latest Nightly (96.0a1. 2021-11-17).
  • latest Beta (95.0.0-beta4).
  • latest Release (94.1.2).

Device used: Xiaomi Mi11 (Android 11).

@SoftVision-LorandJanos SoftVision-LorandJanos added b:landscape Landscape bug qa-triaged Issues triaged by qa S3 Blocks non-critical functionality and a work around exists labels Nov 17, 2021
@czlucius
Copy link
Contributor Author

Thanks

I think this problem was not discovered when I added my fix to fenix few months ago.
See this PR: #20486

@czlucius
Copy link
Contributor Author

czlucius commented Jan 20, 2022

I'd like to work on this issue.
Will push a PR soon.

@Mugurell
Copy link
Contributor

Mugurell commented Feb 17, 2022

I could not reproduce on a Pixel 3 with Android 12.
@czlucius @SoftVision-LorandJanos Can the STRs be distilled a bit more? Is this an intermittent issue? Are there other steps needed? Does it seems device specific?

PipToMozilla.mp4

@czlucius
Copy link
Contributor Author

I just tried on my device, seems like the bug is no longer reproducible.
I used the same device listed above, but updated to Android 12.

@czlucius
Copy link
Contributor Author

New steps to reproduce:

  1. Launch a YouTube video
  2. Go to the home screen
  3. Launch Fenix from the search widget (not from the app shortcuts)

Note that this may not be a problem with PiP because this happens regardless of whether the video was playing at Step 1.

Thanks.

@Mugurell
Copy link
Contributor

Mugurell commented Mar 1, 2022

Thank you @czlucius!
Interestingly the above scenario will crash the app for me most of the times - created #24040 to address this.

Other than your above steps a scenario that would lead to the described issue:

  • have a website shortcut added to homescreen
  • play a fullscreen video, enter pip
  • tap to open the website shortcut from device's homescreen.

The problem I think is somewhere in the AC's MediaSessionFullscreenFeature which seems to set screen orientation more often than expected and in some scenarios not the orientation that we'd want.

@Mugurell
Copy link
Contributor

Mugurell commented Jun 6, 2022

There is a similar issue for when using custom tabs - #25413 but with the crash from #24040 now being resolved resolved I think we can close this.

@Mugurell Mugurell added the eng:qa:needed QA Needed label Jun 6, 2022
@LaurentiuApahideanSV
Copy link

I tested the issue on Firefox nightly 103.0a1 2022-06-08 and can confirm the issue is fixed.

Devices used:

  • Google Pixel 6 (Android 13)
  • OnePlus 6T (Android 9)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
b:landscape Landscape bug 🐞 bug Crashes, Something isn't working, .. eng:qa:verified QA Verified needs:triage Issue needs triage qa-triaged Issues triaged by qa S3 Blocks non-critical functionality and a work around exists
Projects
None yet
Development

No branches or pull requests

4 participants