public final class ServiceManager extends Object
Constructor and Description |
---|
ServiceManager() |
Modifier and Type | Method and Description |
---|---|
static void |
addService(String name,
IBinder service)
Place a new @a service called @a name into the service
manager.
|
static IBinder |
checkService(String name)
Retrieve an existing service called @a name from the
service manager.
|
static IBinder |
getService(String name)
Returns a reference to a service with the given name.
|
static void |
initServiceCache(Map<String,IBinder> cache)
This is only intended to be called when the process is first being brought
up and bound by the activity manager.
|
static String[] |
listServices()
Return a list of all currently running services.
|
public static IBinder getService(String name)
name
- the name of the service to getnull
if the service doesn't existpublic static void addService(String name, IBinder service)
name
- the name of the new serviceservice
- the service objectpublic static IBinder checkService(String name)
public static String[] listServices() throws RemoteException
RemoteException
public static void initServiceCache(Map<String,IBinder> cache)
cache
- the cache of service references