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

View File

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