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.
Comment 1•2 years ago
|
||
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•2 years ago
|
Assignee | ||
Comment 2•1 year ago
|
||
I'd like to take a crack at this one.
Comment 3•1 year ago
|
||
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•1 year ago
|
||
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
Comment 6•1 year ago
|
||
bugherder |
Description
•