-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QA-15737 Get the market name from the device #59
Conversation
lib/util/devutil.js
Outdated
@@ -191,4 +181,18 @@ devutil.makeIdentity = function(serial, properties) { | |||
, ram: ram | |||
} | |||
} | |||
|
|||
devutil.getDeviceMarketName = function(adb, serial) { | |||
return adb.getDevice(serial).execOut('settings get global device_name', 'utf-8').then(function(deviceName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9d530c1
to
15af734
Compare
716dbc0
to
58a64bb
Compare
let product = properties['ro.product.name'] | ||
let cpuPlatform = properties['ro.board.platform'] | ||
let openGLESVersion = properties['ro.opengles.version'] | ||
let marketName = await devutil.getDeviceMarketName() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An error might still raise here, since no .catch block in getDeviceMarketName. Maybe surround with try catch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add catch block with default value
17b6a53
to
6675f4e
Compare
-use DI syrup for devutil and refactoring depends on it -delete redundant part -add default value and warning -add different ways to get vendor's market name -get marketname from settings
6675f4e
to
9c79a18
Compare
-get marketname from settings