@Implements(value=android.os.ServiceManager.class, isInAndroidSdk=false) public class ShadowServiceManager extends Object
ServiceManager
.Constructor | Description |
---|---|
ShadowServiceManager() |
Modifier and Type | Method | Description |
---|---|---|
protected static void |
addBinderService(String name,
Class<? extends IInterface> clazz) |
|
protected static void |
addBinderService(String name,
Class<? extends IInterface> clazz,
boolean useDeepBinder) |
|
protected static void |
addBinderService(String name,
Class<? extends IInterface> clazz,
String className,
boolean useDeepBinder) |
|
protected static void |
addBinderService(String name,
String className) |
|
protected static void |
addService(String name,
IBinder service) |
|
protected static IBinder |
checkService(String name) |
|
protected static IBinder |
getService(String name) |
Returns the binder associated with the given system service.
|
protected static void |
initServiceCache(Map<String,IBinder> cache) |
|
protected static String[] |
listServices() |
|
static void |
reset() |
|
static void |
setServiceAvailability(String service,
boolean available) |
Sets the availability of the given system service.
|
protected static void addBinderService(String name, Class<? extends IInterface> clazz)
protected static void addBinderService(String name, Class<? extends IInterface> clazz, boolean useDeepBinder)
protected static void addBinderService(String name, Class<? extends IInterface> clazz, String className, boolean useDeepBinder)
@Implementation protected static IBinder getService(String name)
setServiceAvailability(java.lang.String, boolean)
, null
will be returned.@Implementation protected static void addService(String name, IBinder service)
@Implementation protected static IBinder checkService(String name)
@Implementation protected static String[] listServices() throws RemoteException
RemoteException
@Implementation protected static void initServiceCache(Map<String,IBinder> cache)
public static void setServiceAvailability(String service, boolean available)
Context.getSystemService(java.lang.String)
for that service will return null
.@Resetter public static void reset()