@Implements(value=android.os.SystemProperties.class, isInAndroidSdk=false) public class ShadowSystemProperties extends Object
Constructor | Description |
---|---|
ShadowSystemProperties() |
Modifier and Type | Method | Description |
---|---|---|
protected static String |
native_get(String key) |
|
protected static String |
native_get(String key,
String def) |
|
protected static boolean |
native_get_boolean(String key,
boolean def) |
|
protected static int |
native_get_int(String key,
int def) |
|
protected static long |
native_get_long(String key,
long def) |
|
protected static void |
native_set(String key,
String val) |
|
static void |
override(String key,
String val) |
Overrides the system property for testing.
|
static void |
reset() |
@Implementation protected static String native_get(String key)
@Implementation protected static String native_get(String key, String def)
@Implementation protected static int native_get_int(String key, int def)
@Implementation protected static long native_get_long(String key, long def)
@Implementation protected static boolean native_get_boolean(String key, boolean def)
@Implementation protected static void native_set(String key, String val)
public static void override(String key, String val)
Note: Use ShadowBuild
instead for changing fields in
Build
.
@Resetter public static void reset()