@Implements(android.os.Build.class) public class ShadowBuild extends Object
Modifier and Type | Field | Description |
---|---|---|
static int |
Q |
Deprecated.
use Build.VERSION_CODES.Q
|
Constructor | Description |
---|---|
ShadowBuild() |
Modifier and Type | Method | Description |
---|---|---|
protected static String |
getRadioVersion() |
|
protected static String |
getSerial() |
|
static void |
reset() |
|
static void |
setBrand(String brand) |
Sets the value of the
Build.BRAND field. |
static void |
setDevice(String device) |
Sets the value of the
Build.DEVICE field. |
static void |
setFingerprint(String fingerprint) |
Sets the value of the
Build.FINGERPRINT field. |
static void |
setHardware(String hardware) |
Sets the value of the
Build.HARDWARE field. |
static void |
setId(String id) |
Sets the value of the
Build.ID field. |
static void |
setManufacturer(String manufacturer) |
Sets the value of the
Build.MANUFACTURER field. |
static void |
setModel(String model) |
Sets the value of the
Build.MODEL field. |
static void |
setProduct(String product) |
Sets the value of the
Build.PRODUCT field. |
static void |
setRadioVersion(String radioVersion) |
Override return value from
Build.getRadioVersion() |
static void |
setSupported64BitAbis(String[] supported64BitAbis) |
Sets the value of the
Build.SUPPORTED_64_BIT_ABIS field. |
static void |
setTags(String tags) |
Sets the value of the
Build.TAGS field. |
static void |
setType(String type) |
Sets the value of the
Build.TYPE field. |
static void |
setVersionCodename(String versionCodename) |
Sets the value of the
Build.VERSION.CODENAME field. |
static void |
setVersionIncremental(String versionIncremental) |
Sets the value of the
Build.VERSION.INCREMENTAL field. |
static void |
setVersionRelease(String release) |
Sets the value of the
Build.VERSION.RELEASE field. |
static void |
setVersionSecurityPatch(String securityPatch) |
Sets the value of the
Build.VERSION.SECURITY_PATCH field. |
@Deprecated public static final int Q
public static void setDevice(String device)
Build.DEVICE
field.
It will be reset for the next test.
public static void setFingerprint(String fingerprint)
Build.FINGERPRINT
field.
It will be reset for the next test.
public static void setId(String id)
Build.ID
field.
It will be reset for the next test.
public static void setProduct(String product)
Build.PRODUCT
field.
It will be reset for the next test.
public static void setModel(String model)
Build.MODEL
field.
It will be reset for the next test.
public static void setManufacturer(String manufacturer)
Build.MANUFACTURER
field.
It will be reset for the next test.
public static void setBrand(String brand)
Build.BRAND
field.
It will be reset for the next test.
public static void setHardware(String hardware)
Build.HARDWARE
field.
It will be reset for the next test.
public static void setVersionCodename(String versionCodename)
Build.VERSION.CODENAME
field.
It will be reset for the next test.
public static void setVersionIncremental(String versionIncremental)
Build.VERSION.INCREMENTAL
field.
It will be reset for the next test.
public static void setVersionRelease(String release)
Build.VERSION.RELEASE
field.
It will be reset for the next test.
public static void setVersionSecurityPatch(String securityPatch)
Build.VERSION.SECURITY_PATCH
field. Available in Android M+.
It will be reset for the next test.
public static void setTags(String tags)
Build.TAGS
field.
It will be reset for the next test.
public static void setType(String type)
Build.TYPE
field.
It will be reset for the next test.
public static void setSupported64BitAbis(String[] supported64BitAbis)
Build.SUPPORTED_64_BIT_ABIS
field. Available in Android L+.
It will be reset for the next test.
public static void setRadioVersion(String radioVersion)
Build.getRadioVersion()
radioVersion
- @Implementation protected static String getRadioVersion()
@Implementation(minSdk=26) protected static String getSerial()
@Resetter public static void reset()