Backport - Improve detection for Nokia device & Symbian OS

(cherry picked from commit 10ab810568db032035cd11822fd8ef58c74fbe18)
This commit is contained in:
Faisal Salman 2024-12-23 13:30:16 +07:00
parent 5c811b8006
commit 56bd805dc8
2 changed files with 13 additions and 11 deletions

View File

@ -490,9 +490,11 @@
], [MODEL, [VENDOR, 'Lenovo'], [TYPE, TABLET]], [
// Nokia
/(?:maemo|nokia).*(n900|lumia \d+)/i,
/nokia[-_ ]?([-\w\.]*)/i
], [[MODEL, /_/g, ' '], [VENDOR, 'Nokia'], [TYPE, MOBILE]], [
/(nokia) (t[12][01])/i
], [VENDOR, MODEL, [TYPE, TABLET]], [
/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,
/nokia[-_ ]?(([-\w\. ]*))/i
], [[MODEL, /_/g, ' '], [TYPE, MOBILE], [VENDOR, 'Nokia']], [
// Google
/(pixel c)\b/i // Google Pixel C
@ -807,15 +809,15 @@
// Mobile OSes
/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i // Android-x86/HarmonyOS
], [VERSION, NAME], [ // Android/WebOS/QNX/Bada/RIM/Maemo/MeeGo/Sailfish OS/OpenHarmony
/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,
/(blackberry)\w*\/([\w\.]*)/i, // Blackberry
/(tizen|kaios)[\/ ]([\w\.]+)/i, // Tizen/KaiOS
/\((series40);/i // Series 40
], [VERSION, NAME], [
/(ubuntu) ([\w\.]+) like android/i // Ubuntu Touch
], [[NAME, /(.+)/, '$1 Touch'], VERSION], [
// Android/Blackberry/WebOS/QNX/Bada/RIM/KaiOS/Maemo/MeeGo/S40/Sailfish OS/OpenHarmony/Tizen
/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i
], [NAME, VERSION], [
/\(bb(10);/i // BlackBerry 10
], [VERSION, [NAME, BLACKBERRY]], [
/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i // Symbian
/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i // Symbian
], [VERSION, [NAME, 'Symbian']], [
/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i // Firefox OS
], [VERSION, [NAME, FIREFOX+' OS']], [

View File

@ -320,7 +320,7 @@
"expect" :
{
"name" : "QNX",
"version" : "x86pc"
"version" : "undefined"
}
},
{
@ -374,7 +374,7 @@
"expect" :
{
"name" : "Symbian",
"version" : "5.2"
"version" : "3"
}
},
{