summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/pm
diff options
context:
space:
mode:
authorFred Quintana <fredq@google.com>2009-07-16 16:36:38 -0700
committerFred Quintana <fredq@google.com>2009-07-23 16:03:54 -0700
commitd4a1d2e14297a3387fdb5761090961e714370492 (patch)
tree429926e69913d0e7d0082455d50142b47172c075 /core/java/android/content/pm
parentc8f361450403e0b08a9d7dc4785bb12624435c37 (diff)
downloadframeworks_base-d4a1d2e14297a3387fdb5761090961e714370492.zip
frameworks_base-d4a1d2e14297a3387fdb5761090961e714370492.tar.gz
frameworks_base-d4a1d2e14297a3387fdb5761090961e714370492.tar.bz2
add account manager permission checking
Diffstat (limited to 'core/java/android/content/pm')
-rw-r--r--core/java/android/content/pm/RegisteredServicesCache.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/java/android/content/pm/RegisteredServicesCache.java b/core/java/android/content/pm/RegisteredServicesCache.java
index bb94372..342de2b 100644
--- a/core/java/android/content/pm/RegisteredServicesCache.java
+++ b/core/java/android/content/pm/RegisteredServicesCache.java
@@ -114,10 +114,12 @@ public abstract class RegisteredServicesCache<V> {
public static class ServiceInfo<V> {
public final V type;
public final ComponentName componentName;
+ public final int uid;
- private ServiceInfo(V type, ComponentName componentName) {
+ private ServiceInfo(V type, ComponentName componentName, int uid) {
this.type = type;
this.componentName = componentName;
+ this.uid = uid;
}
public String toString() {
@@ -223,7 +225,10 @@ public abstract class RegisteredServicesCache<V> {
if (v == null) {
return null;
}
- return new ServiceInfo<V>(v, componentName);
+ final android.content.pm.ServiceInfo serviceInfo = service.serviceInfo;
+ final ApplicationInfo applicationInfo = serviceInfo.applicationInfo;
+ final int uid = applicationInfo.uid;
+ return new ServiceInfo<V>(v, componentName, uid);
} finally {
if (parser != null) parser.close();
}