Merge pull request #383 from 8thwall/huaweiDevices

Detect Huawei P20, P20 Lite and P30 Pro
This commit is contained in:
Faisal Salman 2019-08-27 14:21:39 +07:00 committed by GitHub
commit 44d4ed5350
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 2 deletions

View File

@ -481,7 +481,7 @@
], [MODEL, [VENDOR, 'HTC'], [TYPE, TABLET]], [
/d\/huawei([\w\s-]+)[;\)]/i,
/(nexus\s6p)/i // Huawei
/(nexus\s6p|vog-l29|ane-lx1|eml-l29)/i // Huawei
], [MODEL, [VENDOR, 'Huawei'], [TYPE, MOBILE]], [
/(microsoft);\s(lumia[\s\w]+)/i // Microsoft Lumia

View File

@ -1041,5 +1041,32 @@
"model": "MI PAD 2",
"type": "tablet"
}
},
{
"desc": "Huawei P30 Pro",
"ua": "Mozilla/5.0 (Linux; Android 9; VOG-L29) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.143 Mobile Safari/537.36",
"expect": {
"vendor": "Huawei",
"model": "VOG-L29",
"type": "mobile"
}
},
{
"desc": "Huawei P20 Lite",
"ua": "Mozilla/5.0 (Linux; Android 8.0.0; ANE-LX1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.143 Mobile Safari/537.36",
"expect": {
"vendor": "Huawei",
"model": "ANE-LX1",
"type": "mobile"
}
},
{
"desc": "Huawei P20",
"ua": "Mozilla/5.0 (Linux; Android 8.1.0; EML-L29) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Mobile Safari/537.36",
"expect": {
"vendor": "Huawei",
"model": "EML-L29",
"type": "mobile"
}
}
]