1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 02:29:26 +02:00

Add SONY_ERICSSON to manufacturer list and try to be a bit more intelligent when detecting it.

This commit is contained in:
Simo Kinnunen 2014-01-30 20:05:16 +09:00
parent f8cceffe91
commit aca775b7f7
2 changed files with 27 additions and 37 deletions

View file

@ -155,26 +155,15 @@ devutil.platform = function(platform) {
} }
devutil.manufacturer = function(manufacturer) { devutil.manufacturer = function(manufacturer) {
switch (manufacturer.toUpperCase()) { var sanitized = manufacturer.toUpperCase().replace(/ /g, '_')
case 'SONY':
case 'SONY ERICSSON': if (wire.DeviceManufacturer[sanitized]) {
return wire.DeviceManufacturer.SONY return wire.DeviceManufacturer[sanitized]
case 'FUJITSU': }
return wire.DeviceManufacturer.FUJITSU
case 'HTC': switch (sanitized) {
return wire.DeviceManufacturer.HTC
case 'SHARP':
return wire.DeviceManufacturer.SHARP
case 'LGE': case 'LGE':
return wire.DeviceManufacturer.LG return wire.DeviceManufacturer.LG
case 'SAMSUNG':
return wire.DeviceManufacturer.SAMSUNG
case 'ASUS':
return wire.DeviceManufacturer.ASUS
case 'NEC':
return wire.DeviceManufacturer.NEC
case 'PANASONIC':
return wire.DeviceManufacturer.PANASONIC
default: default:
throw new Error(util.format('Unmapped manufacturer "%s"', manufacturer)) throw new Error(util.format('Unmapped manufacturer "%s"', manufacturer))
} }

View file

@ -91,8 +91,9 @@ enum DeviceManufacturer {
SAMSUNG = 2500; SAMSUNG = 2500;
SHARP = 2600; SHARP = 2600;
SONY = 2700; SONY = 2700;
TOSHIBA = 2800; SONY_ERICSSON = 2800;
ZTE = 2900; TOSHIBA = 2900;
ZTE = 3000;
} }
message DeviceDisplayMessage { message DeviceDisplayMessage {