mirror of
https://github.com/openstf/stf
synced 2025-10-05 10:39:25 +02:00
Nexus 9 support. Home button doesn't work, presumably due to auto-unlocking.
This commit is contained in:
parent
28adf6fd96
commit
6b5ecf3afb
7 changed files with 77 additions and 11 deletions
45
lib/units/device/support/abi.js
Normal file
45
lib/units/device/support/abi.js
Normal file
|
@ -0,0 +1,45 @@
|
|||
var syrup = require('stf-syrup')
|
||||
var _ = require('lodash')
|
||||
|
||||
var logger = require('../../../util/logger')
|
||||
|
||||
module.exports = syrup.serial()
|
||||
.dependency(require('./properties'))
|
||||
.define(function(options, properties) {
|
||||
var log = logger.createLogger('device:support:abi')
|
||||
return (function() {
|
||||
|
||||
function split(list) {
|
||||
return list ? list.split(',') : []
|
||||
}
|
||||
|
||||
var abi = {
|
||||
primary: properties['ro.product.cpu.abi']
|
||||
, pie: properties['ro.build.version.sdk'] >= 16
|
||||
, all: []
|
||||
, b32: []
|
||||
, b64: []
|
||||
}
|
||||
|
||||
// Since Android 5.0
|
||||
if (properties['ro.product.cpu.abilist']) {
|
||||
abi.all = split(properties['ro.product.cpu.abilist'])
|
||||
abi.b64 = split(properties['ro.product.cpu.abilist64'])
|
||||
abi.b32 = split(properties['ro.product.cpu.abilist32'])
|
||||
}
|
||||
// Up to Android 4.4
|
||||
else {
|
||||
abi.all.push(abi.primary)
|
||||
abi.b32.push(abi.primary)
|
||||
if (properties['ro.product.cpu.abi2']) {
|
||||
abi.all.push(properties['ro.product.cpu.abi2'])
|
||||
abi.b32.push(properties['ro.product.cpu.abi2'])
|
||||
}
|
||||
}
|
||||
|
||||
log.info('Supports ABIs %s', abi.all.join(', '))
|
||||
|
||||
return abi
|
||||
|
||||
})()
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue