Class ShadowBuild


  • @Implements(android.os.Build.class)
    public class ShadowBuild
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int Q
      Deprecated.
      use Build.VERSION_CODES.Q
    • Constructor Summary

      Constructors 
      Constructor Description
      ShadowBuild()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static java.lang.String getRadioVersion()  
      protected static java.lang.String getSerial()  
      static void reset()  
      static void setBrand​(java.lang.String brand)
      Sets the value of the Build.BRAND field.
      static void setDevice​(java.lang.String device)
      Sets the value of the Build.DEVICE field.
      static void setFingerprint​(java.lang.String fingerprint)
      Sets the value of the Build.FINGERPRINT field.
      static void setHardware​(java.lang.String hardware)
      Sets the value of the Build.HARDWARE field.
      static void setId​(java.lang.String id)
      Sets the value of the Build.ID field.
      static void setManufacturer​(java.lang.String manufacturer)
      Sets the value of the Build.MANUFACTURER field.
      static void setModel​(java.lang.String model)
      Sets the value of the Build.MODEL field.
      static void setProduct​(java.lang.String product)
      Sets the value of the Build.PRODUCT field.
      static void setRadioVersion​(java.lang.String radioVersion)
      Override return value from Build.getRadioVersion()
      static void setSupported64BitAbis​(java.lang.String[] supported64BitAbis)
      Sets the value of the Build.SUPPORTED_64_BIT_ABIS field.
      static void setTags​(java.lang.String tags)
      Sets the value of the Build.TAGS field.
      static void setType​(java.lang.String type)
      Sets the value of the Build.TYPE field.
      static void setVersionCodename​(java.lang.String versionCodename)
      Sets the value of the Build.VERSION.CODENAME field.
      static void setVersionIncremental​(java.lang.String versionIncremental)
      Sets the value of the Build.VERSION.INCREMENTAL field.
      static void setVersionRelease​(java.lang.String release)
      Sets the value of the Build.VERSION.RELEASE field.
      static void setVersionSecurityPatch​(java.lang.String securityPatch)
      Sets the value of the Build.VERSION.SECURITY_PATCH field.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • Q

        @Deprecated
        public static final int Q
        Deprecated.
        use Build.VERSION_CODES.Q
        See Also:
        Constant Field Values
    • Constructor Detail

      • ShadowBuild

        public ShadowBuild()
    • Method Detail

      • setDevice

        public static void setDevice​(java.lang.String device)
        Sets the value of the Build.DEVICE field.

        It will be reset for the next test.

      • setFingerprint

        public static void setFingerprint​(java.lang.String fingerprint)
        Sets the value of the Build.FINGERPRINT field.

        It will be reset for the next test.

      • setId

        public static void setId​(java.lang.String id)
        Sets the value of the Build.ID field.

        It will be reset for the next test.

      • setProduct

        public static void setProduct​(java.lang.String product)
        Sets the value of the Build.PRODUCT field.

        It will be reset for the next test.

      • setModel

        public static void setModel​(java.lang.String model)
        Sets the value of the Build.MODEL field.

        It will be reset for the next test.

      • setManufacturer

        public static void setManufacturer​(java.lang.String manufacturer)
        Sets the value of the Build.MANUFACTURER field.

        It will be reset for the next test.

      • setBrand

        public static void setBrand​(java.lang.String brand)
        Sets the value of the Build.BRAND field.

        It will be reset for the next test.

      • setHardware

        public static void setHardware​(java.lang.String hardware)
        Sets the value of the Build.HARDWARE field.

        It will be reset for the next test.

      • setVersionCodename

        public static void setVersionCodename​(java.lang.String versionCodename)
        Sets the value of the Build.VERSION.CODENAME field.

        It will be reset for the next test.

      • setVersionIncremental

        public static void setVersionIncremental​(java.lang.String versionIncremental)
        Sets the value of the Build.VERSION.INCREMENTAL field.

        It will be reset for the next test.

      • setVersionRelease

        public static void setVersionRelease​(java.lang.String release)
        Sets the value of the Build.VERSION.RELEASE field.

        It will be reset for the next test.

      • setVersionSecurityPatch

        public static void setVersionSecurityPatch​(java.lang.String securityPatch)
        Sets the value of the Build.VERSION.SECURITY_PATCH field. Available in Android M+.

        It will be reset for the next test.

      • setTags

        public static void setTags​(java.lang.String tags)
        Sets the value of the Build.TAGS field.

        It will be reset for the next test.

      • setType

        public static void setType​(java.lang.String type)
        Sets the value of the Build.TYPE field.

        It will be reset for the next test.

      • setSupported64BitAbis

        public static void setSupported64BitAbis​(java.lang.String[] supported64BitAbis)
        Sets the value of the Build.SUPPORTED_64_BIT_ABIS field. Available in Android L+.

        It will be reset for the next test.

      • setRadioVersion

        public static void setRadioVersion​(java.lang.String radioVersion)
        Override return value from Build.getRadioVersion()
        Parameters:
        radioVersion -
      • getRadioVersion

        @Implementation
        protected static java.lang.String getRadioVersion()
      • getSerial

        @Implementation(minSdk=26)
        protected static java.lang.String getSerial()
      • reset

        @Resetter
        public static void reset()