@Implements(value=android.os.Process.class) public class ShadowProcess extends java.lang.Object
Constructor and Description |
---|
ShadowProcess() |
Modifier and Type | Method and Description |
---|---|
static int |
myPid() |
static int |
myUid()
Returns the identifier of this process’s uid.
|
static void |
reset() |
static void |
setPid(int pid)
Sets the identifier of this process.
|
@Implementation public static final int myPid()
@Implementation public static final int myUid()
Returns the identifier of this process’s uid. Unlike Android UIDs are randomly initialized to prevent tests from depending on any given value. Tests should access the current process UID via Process.myUid()
.
public static void setPid(int pid)
Sets the identifier of this process.
@Resetter public static void reset()