Package org.robolectric.shadows
Class ShadowBuild
- java.lang.Object
-
- org.robolectric.shadows.ShadowBuild
-
@Implements(android.os.Build.class) public class ShadowBuild extends Object
-
-
Constructor Summary
Constructors Constructor Description ShadowBuild()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static StringgetRadioVersion()protected static StringgetSerial()static voidreset()static voidsetBrand(String brand)Sets the value of theBuild.BRANDfield.static voidsetDevice(String device)Sets the value of theBuild.DEVICEfield.static voidsetFingerprint(String fingerprint)Sets the value of theBuild.FINGERPRINTfield.static voidsetHardware(String hardware)Sets the value of theBuild.HARDWAREfield.static voidsetId(String id)Sets the value of theBuild.IDfield.static voidsetManufacturer(String manufacturer)Sets the value of theBuild.MANUFACTURERfield.static voidsetModel(String model)Sets the value of theBuild.MODELfield.static voidsetProduct(String product)Sets the value of theBuild.PRODUCTfield.static voidsetRadioVersion(String radioVersion)Override return value fromBuild.getRadioVersion()static voidsetSerial(String serial)Override return value fromBuild.getSerial().static voidsetSupported64BitAbis(String[] supported64BitAbis)Sets the value of theBuild.SUPPORTED_64_BIT_ABISfield.static voidsetTags(String tags)Sets the value of theBuild.TAGSfield.static voidsetType(String type)Sets the value of theBuild.TYPEfield.static voidsetVersionCodename(String versionCodename)Sets the value of theBuild.VERSION.CODENAMEfield.static voidsetVersionIncremental(String versionIncremental)Sets the value of theBuild.VERSION.INCREMENTALfield.static voidsetVersionMediaPerformanceClass(int performanceClass)Sets the value of theBuild.VERSION.MEDIA_PERFORMANCE_CLASSfield.static voidsetVersionRelease(String release)Sets the value of theBuild.VERSION.RELEASEfield.static voidsetVersionSecurityPatch(String securityPatch)Sets the value of theBuild.VERSION.SECURITY_PATCHfield.
-
-
-
Method Detail
-
setDevice
public static void setDevice(String device)
Sets the value of theBuild.DEVICEfield.It will be reset for the next test.
-
setFingerprint
public static void setFingerprint(String fingerprint)
Sets the value of theBuild.FINGERPRINTfield.It will be reset for the next test.
-
setId
public static void setId(String id)
Sets the value of theBuild.IDfield.It will be reset for the next test.
-
setProduct
public static void setProduct(String product)
Sets the value of theBuild.PRODUCTfield.It will be reset for the next test.
-
setModel
public static void setModel(String model)
Sets the value of theBuild.MODELfield.It will be reset for the next test.
-
setManufacturer
public static void setManufacturer(String manufacturer)
Sets the value of theBuild.MANUFACTURERfield.It will be reset for the next test.
-
setBrand
public static void setBrand(String brand)
Sets the value of theBuild.BRANDfield.It will be reset for the next test.
-
setHardware
public static void setHardware(String hardware)
Sets the value of theBuild.HARDWAREfield.It will be reset for the next test.
-
setSerial
public static void setSerial(String serial)
Override return value fromBuild.getSerial().
-
setVersionCodename
public static void setVersionCodename(String versionCodename)
Sets the value of theBuild.VERSION.CODENAMEfield.It will be reset for the next test.
-
setVersionIncremental
public static void setVersionIncremental(String versionIncremental)
Sets the value of theBuild.VERSION.INCREMENTALfield.It will be reset for the next test.
-
setVersionMediaPerformanceClass
public static void setVersionMediaPerformanceClass(int performanceClass)
Sets the value of theBuild.VERSION.MEDIA_PERFORMANCE_CLASSfield. Available in Android S+.It will be reset for the next test.
-
setVersionRelease
public static void setVersionRelease(String release)
Sets the value of theBuild.VERSION.RELEASEfield.It will be reset for the next test.
-
setVersionSecurityPatch
public static void setVersionSecurityPatch(String securityPatch)
Sets the value of theBuild.VERSION.SECURITY_PATCHfield. Available in Android M+.It will be reset for the next test.
-
setTags
public static void setTags(String tags)
Sets the value of theBuild.TAGSfield.It will be reset for the next test.
-
setType
public static void setType(String type)
Sets the value of theBuild.TYPEfield.It will be reset for the next test.
-
setSupported64BitAbis
public static void setSupported64BitAbis(String[] supported64BitAbis)
Sets the value of theBuild.SUPPORTED_64_BIT_ABISfield. Available in Android L+.It will be reset for the next test.
-
setRadioVersion
public static void setRadioVersion(String radioVersion)
Override return value fromBuild.getRadioVersion()- Parameters:
radioVersion-
-
getRadioVersion
@Implementation protected static String getRadioVersion()
-
getSerial
@Implementation(minSdk=26) protected static String getSerial()
-
reset
@Resetter public static void reset()
-
-