Devices with Android 9 or later are displayed as Linux
Categories
(DevTools :: Responsive Design Mode, defect, P3)
Tracking
(firefox106 fixed)
Tracking | Status | |
---|---|---|
firefox106 | --- | fixed |
People
(Reporter: 6k64x4ma, Assigned: patrickmcghen)
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.
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
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 | ||
Comment 4•3 years ago
|
||
![]() |
||
Comment 6•3 years ago
|
||
bugherder |
Description
•