Class ShadowOs

java.lang.Object
org.robolectric.shadows.ShadowOs

@Implements(android.system.Os.class) public final class ShadowOs extends Object
A Shadow for android.system.Os
  • Method Details

    • setSysconfValue

      public static void setSysconfValue(int name, long value)
      Configures values to be returned by sysconf.
    • sysconf

      @Implementation protected static long sysconf(int name)
      Returns the value configured via setSysconfValue, or -1 if one hasn't been configured.
    • lseek

      @Implementation protected static long lseek(FileDescriptor fd, long offset, int whence) throws ErrnoException
      Shadow implementation of Os.lseek(FileDescriptor, long, int).

      This method overrides the original lseek method to handle the SEEK_SET and SEEK_CUR with the offset cache.

      Throws:
      ErrnoException