Skip to content
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

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

Alk2017
Copy link

@Alk2017 Alk2017 commented Dec 24, 2024

-get marketname from settings

@Alk2017 Alk2017 requested a review from a team as a code owner December 24, 2024 14:02
@@ -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) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in some cases this field contains values like
image

@irdkwmnsb irdkwmnsb changed the title QA-15737 Научиться доставать market name прямо из устройства QA-15737 Get the market name from the device Dec 29, 2024
@DaniilSmirnov DaniilSmirnov linked an issue Jan 9, 2025 that may be closed by this pull request
@Alk2017 Alk2017 force-pushed the a.chistov/get-market-name/QA-15737 branch from 9d530c1 to 15af734 Compare January 9, 2025 14:36
lib/util/devutil.js Outdated Show resolved Hide resolved
lib/util/devutil.js Outdated Show resolved Hide resolved
lib/util/devutil.js Outdated Show resolved Hide resolved
@Alk2017 Alk2017 force-pushed the a.chistov/get-market-name/QA-15737 branch from 716dbc0 to 58a64bb Compare January 13, 2025 12:32
let product = properties['ro.product.name']
let cpuPlatform = properties['ro.board.platform']
let openGLESVersion = properties['ro.opengles.version']
let marketName = await devutil.getDeviceMarketName()

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?

Copy link
Author

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

@Alk2017 Alk2017 force-pushed the a.chistov/get-market-name/QA-15737 branch from 17b6a53 to 6675f4e Compare January 14, 2025 11:45
-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
@Alk2017 Alk2017 force-pushed the a.chistov/get-market-name/QA-15737 branch from 6675f4e to 9c79a18 Compare January 14, 2025 12:19
@Alk2017 Alk2017 merged commit 2a31bc4 into master Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some devices names don't represent with normal names
3 participants