1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 02:09:32 +02:00

Add OpenGL ES version to device properties.

This commit is contained in:
Karol Wrótniak 2017-12-18 03:18:19 +01:00
parent 2dac3d1bbd
commit 2af554e2a3
No known key found for this signature in database
GPG key ID: DE1EED7FE32385FE
6 changed files with 25 additions and 0 deletions

View file

@ -323,6 +323,7 @@ dbapi.saveDeviceIdentity = function(serial, identity) {
, phone: identity.phone , phone: identity.phone
, product: identity.product , product: identity.product
, cpuPlatform: identity.cpuPlatform , cpuPlatform: identity.cpuPlatform
, openGLESVersion: identity.openGLESVersion
})) }))
} }

View file

@ -43,6 +43,7 @@ module.exports = syrup.serial()
, new wire.DevicePhoneMessage(identity.phone) , new wire.DevicePhoneMessage(identity.phone)
, identity.product , identity.product
, identity.cpuPlatform , identity.cpuPlatform
, identity.openGLESVersion
)) ))
]) ])
}) })

View file

@ -108,6 +108,17 @@ devutil.makeIdentity = function(serial, properties) {
var abi = properties['ro.product.cpu.abi'] var abi = properties['ro.product.cpu.abi']
var product = properties['ro.product.name'] var product = properties['ro.product.name']
var cpuPlatform = properties['ro.board.platform'] var cpuPlatform = properties['ro.board.platform']
var openGLESVersion = properties['ro.opengles.version']
openGLESVersion = parseInt(openGLESVersion, 10)
if (isNaN(openGLESVersion)) {
openGLESVersion = '0.0'
}
else {
var openGLESVersionMajor = (openGLESVersion & 0xffff0000) >> 16
var openGLESVersionMinor = (openGLESVersion & 0xffff)
openGLESVersion = openGLESVersionMajor + '.' + openGLESVersionMinor
}
// Remove brand prefix for consistency // Remove brand prefix for consistency
if (model.substr(0, brand.length) === brand) { if (model.substr(0, brand.length) === brand) {
@ -132,5 +143,6 @@ devutil.makeIdentity = function(serial, properties) {
, sdk: sdk , sdk: sdk
, product: product , product: product
, cpuPlatform: cpuPlatform , cpuPlatform: cpuPlatform
, openGLESVersion: openGLESVersion
} }
} }

View file

@ -227,6 +227,7 @@ message DeviceIdentityMessage {
required DevicePhoneMessage phone = 11; required DevicePhoneMessage phone = 11;
optional string product = 12; optional string product = 12;
optional string cpuPlatform = 13; optional string cpuPlatform = 13;
optional string openGLESVersion = 14;
} }
message DeviceProperty { message DeviceProperty {

View file

@ -201,6 +201,12 @@ module.exports = function DeviceColumnService($filter, gettext) {
return device.cpuPlatform || '' return device.cpuPlatform || ''
} }
}) })
, openGLESVersion: TextCell({
title: gettext('OpenGL ES version')
, value: function(device) {
return device.openGLESVersion || ''
}
})
, phone: TextCell({ , phone: TextCell({
title: gettext('Phone') title: gettext('Phone')
, value: function(device) { , value: function(device) {

View file

@ -67,6 +67,10 @@ module.exports = function DeviceListCtrl(
name: 'cpuPlatform' name: 'cpuPlatform'
, selected: false , selected: false
} }
, {
name: 'openGLESVersion'
, selected: false
}
, { , {
name: 'browser' name: 'browser'
, selected: false , selected: false