public class

DeviceBuildDescriptor

extends Object
java.lang.Object
   ↳ com.android.tradefed.build.DeviceBuildDescriptor

Class Overview

A wrapper class for a IBuildInfo, that contains helper methods to retrieve device platform build information.

Intended to be use for "unbundled" aka not device builds IBuildInfo, that desire metadata about what device the build was run on.

Summary

Public Constructors
DeviceBuildDescriptor(IBuildInfo build)
Public Methods
static boolean describesDeviceBuild(IBuildInfo build)
Determines if given IBuildInfo contains device build metadata
static String generateDeviceDesc(ITestDevice device)
Generate the device description string from device properties.
static String generateDeviceProduct(ITestDevice device)
Query the product and variant of the device, in product:variant format.
String getDeviceBuildAlias()
Gets the device build alias.
String getDeviceBuildFlavor()
Gets the device build flavor eg yakju-userdebug.
String getDeviceBuildId()
Gets the device build ID.
String getDeviceProduct()
Get the product and variant of the device, in product:variant format.
String getDeviceUserDescription()
Gets a description of the device and build.
static void injectDeviceAttributes(ITestDevice device, IBuildInfo b)
Inserts attributes from device into build.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DeviceBuildDescriptor (IBuildInfo build)

Public Methods

public static boolean describesDeviceBuild (IBuildInfo build)

Determines if given IBuildInfo contains device build metadata

public static String generateDeviceDesc (ITestDevice device)

Generate the device description string from device properties.

Description should follow this format: eg Google Galaxy Nexus 4.2

public static String generateDeviceProduct (ITestDevice device)

Query the product and variant of the device, in product:variant format.

public String getDeviceBuildAlias ()

Gets the device build alias. Maps to the ro.build.id property on device. Typically follows format IMM76.

public String getDeviceBuildFlavor ()

Gets the device build flavor eg yakju-userdebug.

public String getDeviceBuildId ()

Gets the device build ID. Maps to the ro.build.incremental.id property on device.

public String getDeviceProduct ()

Get the product and variant of the device, in product:variant format.

public String getDeviceUserDescription ()

Gets a description of the device and build. This is typically a more end-user friendly description compared with getDeviceBuildAlias() and getDeviceBuildFlavor() but with the possible penalty of being less precise. eg. it wouldn't be possible to distinguish the GSM (yakju) and CDMA (mysid) variants of Google Galaxy Nexus using this string.

public static void injectDeviceAttributes (ITestDevice device, IBuildInfo b)

Inserts attributes from device into build.