mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 04:53:19 +02:00
Add SONY_ERICSSON to manufacturer list and try to be a bit more intelligent when detecting it.
This commit is contained in:
@@ -155,26 +155,15 @@ devutil.platform = function(platform) {
|
||||
}
|
||||
|
||||
devutil.manufacturer = function(manufacturer) {
|
||||
switch (manufacturer.toUpperCase()) {
|
||||
case 'SONY':
|
||||
case 'SONY ERICSSON':
|
||||
return wire.DeviceManufacturer.SONY
|
||||
case 'FUJITSU':
|
||||
return wire.DeviceManufacturer.FUJITSU
|
||||
case 'HTC':
|
||||
return wire.DeviceManufacturer.HTC
|
||||
case 'SHARP':
|
||||
return wire.DeviceManufacturer.SHARP
|
||||
var sanitized = manufacturer.toUpperCase().replace(/ /g, '_')
|
||||
|
||||
if (wire.DeviceManufacturer[sanitized]) {
|
||||
return wire.DeviceManufacturer[sanitized]
|
||||
}
|
||||
|
||||
switch (sanitized) {
|
||||
case 'LGE':
|
||||
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:
|
||||
throw new Error(util.format('Unmapped manufacturer "%s"', manufacturer))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user