public abstract class RegisteredServicesCache<V> extends Object
PackageManager
on a per-user basis. It's updated as packages are
added, removed and changed. Users are responsible for calling
invalidateCache(int)
when a user is started, since
PackageManager
broadcasts aren't sent for stopped users.
The services are referred to by type V and are made available via the
getServiceInfo(V, int)
method.
Modifier and Type | Class and Description |
---|---|
static class |
RegisteredServicesCache.ServiceInfo<V>
Value type that describes a Service.
|
Constructor and Description |
---|
RegisteredServicesCache(Context context,
String interfaceName,
String metaDataName,
String attributeName,
XmlSerializerAndParser<V> serializerAndParser) |
Modifier and Type | Method and Description |
---|---|
void |
dump(FileDescriptor fd,
PrintWriter fout,
String[] args,
int userId) |
Collection<RegisteredServicesCache.ServiceInfo<V>> |
getAllServices(int userId) |
RegisteredServicesCacheListener<V> |
getListener() |
RegisteredServicesCache.ServiceInfo<V> |
getServiceInfo(V type,
int userId)
Accessor for the registered authenticators.
|
void |
invalidateCache(int userId) |
abstract V |
parseServiceAttributes(Resources res,
String packageName,
AttributeSet attrs) |
void |
setListener(RegisteredServicesCacheListener<V> listener,
Handler handler) |
public final Context mContext
public void invalidateCache(int userId)
public void dump(FileDescriptor fd, PrintWriter fout, String[] args, int userId)
public RegisteredServicesCacheListener<V> getListener()
public void setListener(RegisteredServicesCacheListener<V> listener, Handler handler)
public RegisteredServicesCache.ServiceInfo<V> getServiceInfo(V type, int userId)
type
- the account type of the authenticatorpublic Collection<RegisteredServicesCache.ServiceInfo<V>> getAllServices(int userId)
RegisteredServicesCache.ServiceInfo
objects for all
registered authenticators.public abstract V parseServiceAttributes(Resources res, String packageName, AttributeSet attrs)