public class SystemPropertiesProxy
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
get(java.lang.String key,
java.lang.String def)
Get the value for the given key in the Android system properties
|
java.lang.Boolean |
getBoolean(java.lang.String key,
boolean def)
Get the value for the given key in the Android system properties, returned
as a boolean.
|
static SystemPropertiesProxy |
getInstance()
Gets the singleton instance for this class
|
void |
setClassLoader(java.lang.ClassLoader cl)
Sets the classloader to lookup the class for android.os.SystemProperties
|
public static SystemPropertiesProxy getInstance()
public void setClassLoader(java.lang.ClassLoader cl)
throws java.lang.ClassNotFoundException,
java.lang.SecurityException,
java.lang.NoSuchMethodException
cl - desired classloaderjava.lang.ClassNotFoundException - android.os.SystemProperties class not foundjava.lang.SecurityException - security manager does not allow class loadingjava.lang.NoSuchMethodException - get/getBoolean method does not existpublic java.lang.String get(java.lang.String key,
java.lang.String def)
throws java.lang.IllegalArgumentException
key - the key to lookupdef - a default value to returnjava.lang.IllegalArgumentException - if the key exceeds 32 characterspublic java.lang.Boolean getBoolean(java.lang.String key,
boolean def)
throws java.lang.IllegalArgumentException
key - the key to lookupdef - a default value to returnjava.lang.IllegalArgumentException - if the key exceeds 32 characters