Home | History | Annotate | Download | only in server

Lines Matching defs:Host

77      * When identifying a Host or Provider based on the calling process, use the uid field.
78 * When identifying a Host or Provider based on a package manager broadcast, use the
92 static class Host {
107 Host host;
117 ArrayList<Host> mHosts = new ArrayList<Host>();
193 pw.print(id.host.hostId); pw.print(' ');
194 pw.print(id.host.packageName); pw.print('/');
195 pw.println(id.host.uid);
200 if (id.host != null) {
201 pw.print(" host.callbacks="); pw.println(id.host.callbacks);
212 Host host = mHosts.get(i);
214 pw.print(host.hostId); pw.print(' ');
215 pw.print(host.packageName); pw.print('/');
216 pw.print(host.uid); pw.println(':');
217 pw.print(" callbacks="); pw.println(host.callbacks);
218 pw.print(" instances.size="); pw.print(host.instances.size());
219 pw.print(" zombie="); pw.println(host.zombie);
229 Host host = lookupOrAddHostLocked(callingUid, packageName, hostId);
233 id.host = host;
235 host.instances.add(id);
257 Host host = lookupHostLocked(callingUid, hostId);
258 if (host != null) {
259 deleteHostLocked(host);
271 Host host = mHosts.get(i);
272 if (host.uid == callingUid) {
273 deleteHostLocked(host);
283 void deleteHostLocked(Host host) {
284 final int N = host.instances.size();
286 AppWidgetId id = host.instances.get(i);
289 host.instances.clear();
290 mHosts.remove(host);
292 host.callbacks = null;
296 Host host = id.host;
297 host.instances.remove(id);
298 pruneHostLocked(host);
449 if (id != null && id.provider != null && !id.provider.zombie && !id.host.zombie) {
453 if (id.host.callbacks != null) {
456 id.host.callbacks.updateAppWidget(id.appWidgetId, views);
459 // we know that this host is still referenced by this instance.
460 id.host.callbacks = null;
470 Host host = lookupOrAddHostLocked(callingUid, packageName, hostId);
471 host.callbacks = callbacks;
475 ArrayList<AppWidgetId> instances = host.instances;
489 Host host = lookupHostLocked(getCallingUid(), hostId);
490 if (host != null) {
491 host.callbacks = null;
492 pruneHostLocked(host);
498 if (id.host.uid == callingUid) {
539 Host lookupHostLocked(int uid, int hostId) {
542 Host h = mHosts.get(i);
550 Host lookupOrAddHostLocked(int uid, String packageName, int hostId) {
553 Host h = mHosts.get(i);
558 Host host = new Host();
559 host.packageName = packageName;
560 host.uid = uid;
561 host.hostId = hostId;
562 mHosts.add(host);
563 return host;
566 void pruneHostLocked(Host host) {
567 if (host.instances.size() == 0 && host.callbacks == null) {
568 mHosts.remove(host);
603 // Stop telling the host about updates for this from now on
606 id.host.instances.remove(id);
609 pruneHostLocked(id.host);
610 id.host = null;
881 Host host = mHosts.get(i);
883 out.attribute(null, "pkg", host.packageName);
884 out.attribute(null, "id", Integer.toHexString(host.hostId));
886 host.tag = i;
894 out.attribute(null, "h", Integer.toHexString(id.host.tag));
970 Host host = new Host();
974 host.packageName = parser.getAttributeValue(null, "pkg");
976 host.uid = getUidForPackage(host.packageName);
978 host.zombie = true;
980 if (!host.zombie || mSafeMode) {
983 host.hostId = Integer.parseInt(
985 mHosts.add(host);
1007 // This provider is gone. We just let the host figure out
1014 id.host = mHosts.get(hIndex);
1015 if (id.host == null) {
1016 // This host is gone.
1023 id.host.instances.add(id);
1214 if (id.host != null && id.host.callbacks != null) {
1216 id.host.callbacks.providerChanged(id.appWidgetId, p.info);
1219 // we know that this host is still referenced by this
1221 id.host.callbacks = null;
1225 // Now that we've told the host, push out an update.
1259 Host host = mHosts.get(i);
1260 if (pkgName.equals(host.packageName)) {
1261 deleteHostLocked(host);