Closed Bug 1743334 Opened 1 year ago Closed 6 months ago

Devices with Android 9 or later are displayed as Linux

Categories

(DevTools :: Responsive Design Mode, defect, P3)

Firefox 95
defect

Tracking

(firefox106 fixed)

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: 6k64x4ma, Assigned: pmcghen)

Details

(Keywords: good-first-bug)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0

Steps to reproduce:

  • Activate the Responsive Design Mode and check the device list.
  • Add a custom device with Android 9 or later.
    e.g. Mozilla/5.0 (Linux; Android 9; Pixel 3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.120 Mobile Safari/537.36

Actual results:

Devices with Android 9 or later are displayed as Linux.

Expected results:

RDM should display them as Android.

It seems that we always expect the Android version to have at least two sub version numbers. Meaning Android 9.0.0 will be recognized as Android, but Android 9 will not.

The logic can be found at https://searchfox.org/mozilla-central/rev/3d03a3ca09f03f06ef46a511446537563f62a0c6/devtools/client/responsive/utils/ua.js#54

It seems to come from the initial implementation of the UA parser for RDM made in Bug 1306198. But Android 9 seems to be found in real UA strings so we should recognize it properly. Note that it doesn't really impact how the Custom Device is handled, I think this only impacts the way we build the RDM ui.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Severity: -- → S3
Keywords: good-first-bug
Priority: -- → P3

I'd like to take a crack at this one.

Thanks! Assigning the bug to you, don't hesitate to ask here or on https://chat.mozilla.org/#/room/#devtools:mozilla.org if you have any issue.

Assignee: nobody → pmcghen
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7c1e795e3c07
[devtools] Add check for Android devices, allow for version number without sub version. r=jdescottes
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in before you can comment on or make changes to this bug.