mirror of
https://github.com/openstf/stf
synced 2025-10-04 10:19:30 +02:00
Add SONY_ERICSSON to manufacturer list and try to be a bit more intelligent when detecting it.
This commit is contained in:
parent
f8cceffe91
commit
aca775b7f7
2 changed files with 27 additions and 37 deletions
|
@ -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))
|
||||
}
|
||||
|
|
|
@ -74,25 +74,26 @@ enum DevicePlatform {
|
|||
}
|
||||
|
||||
enum DeviceManufacturer {
|
||||
ACER = 1100;
|
||||
APPLE = 1200;
|
||||
ASUS = 1300;
|
||||
CASIO = 1400;
|
||||
FUJITSU = 1500;
|
||||
HTC = 1600;
|
||||
HUAWEI = 1700;
|
||||
KYOCERA = 1800;
|
||||
LG = 1900;
|
||||
MOTOROLA = 2000;
|
||||
NEC = 2100;
|
||||
PANASONIC = 2200;
|
||||
PANTECH = 2300;
|
||||
RIM = 2400;
|
||||
SAMSUNG = 2500;
|
||||
SHARP = 2600;
|
||||
SONY = 2700;
|
||||
TOSHIBA = 2800;
|
||||
ZTE = 2900;
|
||||
ACER = 1100;
|
||||
APPLE = 1200;
|
||||
ASUS = 1300;
|
||||
CASIO = 1400;
|
||||
FUJITSU = 1500;
|
||||
HTC = 1600;
|
||||
HUAWEI = 1700;
|
||||
KYOCERA = 1800;
|
||||
LG = 1900;
|
||||
MOTOROLA = 2000;
|
||||
NEC = 2100;
|
||||
PANASONIC = 2200;
|
||||
PANTECH = 2300;
|
||||
RIM = 2400;
|
||||
SAMSUNG = 2500;
|
||||
SHARP = 2600;
|
||||
SONY = 2700;
|
||||
SONY_ERICSSON = 2800;
|
||||
TOSHIBA = 2900;
|
||||
ZTE = 3000;
|
||||
}
|
||||
|
||||
message DeviceDisplayMessage {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue