Backport - Improve device detection for Generic device: capture its device model instead of its Android version

(cherry picked from commit 6c6ff97e0cdff8930cdd09c51667855a4272c1d9)
This commit is contained in:
Faisal Salman 2024-12-16 11:05:24 +07:00
parent 0543fb2e95
commit fc668ef0c0
2 changed files with 9 additions and 2 deletions

View File

@ -793,7 +793,7 @@
], [[TYPE, TABLET]], [
/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i // Unidentifiable Mobile
], [[TYPE, MOBILE]], [
/(android[-\w\. ]{0,9});.+buil/i // Generic Android Device
/droid .+?; ([\w\. -]+)( bui|\))/i // Generic Android Device
], [MODEL, [VENDOR, 'Generic']]
],

View File

@ -5944,7 +5944,14 @@
"ua": "Mozilla/5.0 (Linux; U; Android 6.0.1; i980 Build/MRA58K)",
"expect": {
"vendor": "Generic",
"model": "Android 6.0.1"
"model": "i980"
}
},{
"desc": "Generic Android Device",
"ua": "Dalvik/2.1.0 (Linux; U; Android 9; X96mini_RP Build/X96mini_RP)",
"expect": {
"vendor": "Generic",
"model": "X96mini_RP"
}
},
{