Closed Bug 2018174 Opened 9 months ago Closed 6 months ago

Restrictions on orientation and resizability are ignored when targeting Android 17

Categories

(Firefox for Android :: General, task)

All
Android
task

Tracking

()

RESOLVED FIXED

People

(Reporter: mcarare, Assigned: mcarare)

References

Details

(Whiteboard: [fxdroid][group6] )

See https://developer.android.com/about/versions/17/changes/ff-restrictions-ignored.

One note, I thought the orientation restriction were already imposed in Android 16: https://developer.android.com/about/versions/16/behavior-changes-16#ignore-orientation.

We need to see if there are additional possible issues.

No longer depends on: 2018171
Assignee: nobody → mcarare
Status: NEW → ASSIGNED

Analysis result: No direct changes are required for Android 17 orientation/resizability behavior.

  • The Android 16 Precedent
    Android 16 (API 36) introduced the same large-screen enforcement. It included a temporary developer opt-out mechanism via the UNIVERSAL_RESIZABLE_BY_DEFAULT compat flag. Android 17 simply removes that opt-out — the underlying runtime behavior is identical.
    Fenix and Focus currently target API 36 (targetSdkVersion: 36) and never used the opt-out. This means the full enforcement has been active on every Android 16 device running the apps since that OS shipped and we targeted 36. The app has already been shipping and operating correctly under these exact constraints. Or at least, no new "bugs" would be introduced by the target update.

  • Both Fenix and Focus declare android:resizeableActivity="true" on their main activities. The app has already explicitly opted into resizability, making it a non-issue regardless of platform enforcement. There is nothing to change in the manifests.

The only concern is the orientation locking API that only reports allow or deny with no Exceptions - NotSupportedError would be the specific exception in this case.

Assignee: mcarare → nobody
Status: ASSIGNED → NEW
Blocks: 2037807

agree with this analysis. i checked that we're not using the resizable opt-out here. According to the docs this means any deprecated orientation / resizability flags in use would not have worked anyway.
However, i did find that we are setting requestedOrientation here in ScreenOrientationFeature. The docs say that this will be ignored on large screen devices running in full-screen and multi-window mode.
I think more investigation into how this currently works would be good. If the api is no longer doing anything, we can remove it. Or if it works in only some circumstances, maybe it would benefit from some restrictions or rewording.
i guess this is what your last sentence was referring to as well? are you suggesting we throw an Exception if the API doesn't work in some scenarios?

Yes, https://bugzilla.mozilla.org/show_bug.cgi?id=2037807 will cover the ScreenOrientationFeature.

Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Assignee: nobody → mcarare
You need to log in before you can comment on or make changes to this bug.