Home | History | Annotate | Download | only in server

Lines Matching refs:Host

96      * When identifying a Host or Provider based on the calling process, use the uid field. When
97 * identifying a Host or Provider based on a package manager broadcast, use the package given.
110 static class Host {
122 // For a host that's in the system process, ignore the user id
135 Host host;
190 final ArrayList<Host> mHosts = new ArrayList<Host>();
201 ArrayList<Host> mDeletedHosts = new ArrayList<Host>();
356 private void dumpHost(Host host, int index, PrintWriter pw) {
358 pw.print(host.hostId); pw.print(' ');
359 pw.print(host.packageName); pw.print('/');
360 pw.print(host.uid); pw.println(':');
361 pw.print(" callbacks="); pw.println(host.callbacks);
362 pw.print(" instances.size="); pw.print(host.instances.size());
363 pw.print(" zombie="); pw.println(host.zombie);
370 pw.print(id.host.hostId); pw.print(' ');
371 pw.print(id.host.packageName); pw.print('/');
372 pw.println(id.host.uid);
377 if (id.host != null) {
378 pw.print(" host.callbacks="); pw.println(id.host.callbacks);
451 Host host = lookupOrAddHostLocked(callingUid, packageName, hostId);
455 id.host = host;
457 host.instances.add(id);
461 if (DBG) log("Allocating AppWidgetId for " + packageName + " host=" + hostId
488 Host host = lookupHostLocked(callingUid, hostId);
489 if (host != null) {
490 deleteHostLocked(host);
506 Host host = mHosts.get(i);
507 if (host.uidMatches(callingUid)) {
508 deleteHostLocked(host);
518 void deleteHostLocked(Host host) {
519 final int N = host.instances.size();
521 AppWidgetId id = host.instances.get(i);
524 host.instances.clear();
525 mHosts.remove(host);
526 mDeletedHosts.add(host);
528 host.callbacks = null;
535 Host host = id.host;
536 host.instances.remove(id);
537 pruneHostLocked(host);
1099 if (id != null && id.provider != null && !id.provider.zombie && !id.host.zombie) {
1110 if (id.host.callbacks != null) {
1113 id.host.callbacks.updateAppWidget(id.appWidgetId, views, mUserId);
1116 // we know that this host is still referenced by this instance.
1117 id.host.callbacks = null;
1127 if (id != null && id.provider != null && !id.provider.zombie && !id.host.zombie) {
1129 if (id.host.callbacks != null) {
1132 id.host.callbacks.viewDataChanged(id.appWidgetId, viewId, mUserId);
1135 // we know that this host is still referenced by this instance.
1136 id.host.callbacks = null;
1140 // If the host is unavailable, then we call the associated
1142 if (id.host.callbacks == null) {
1220 Host host = lookupOrAddHostLocked(callingUid, packageName, hostId);
1221 host.callbacks = callbacks;
1225 ArrayList<AppWidgetId> instances = host.instances;
1243 Host host = lookupHostLocked(Binder.getCallingUid(), hostId);
1244 if (host != null) {
1245 host.callbacks = null;
1246 pruneHostLocked(host);
1252 if (id.host.uidMatches(callingUid)) {
1291 Host lookupHostLocked(int uid, int hostId) {
1294 Host h = mHosts.get(i);
1302 Host lookupOrAddHostLocked(int uid, String packageName, int hostId) {
1305 Host h = mHosts.get(i);
1310 Host host = new Host();
1311 host.packageName = packageName;
1312 host.uid = uid;
1313 host.hostId = hostId;
1314 mHosts.add(host);
1315 return host;
1318 void pruneHostLocked(Host host) {
1319 if (host.instances.size() == 0 && host.callbacks == null) {
1320 mHosts.remove(host);
1364 // Stop telling the host about updates for this from now on
1367 id.host.instances.remove(id);
1370 pruneHostLocked(id.host);
1371 id.host = null;
1444 static int[] getAppWidgetIds(Host h) {
1457 Host host = lookupHostLocked(callingUid, hostId);
1458 if (host != null) {
1459 return getAppWidgetIds(host);
1674 Host host = mHosts.get(i);
1676 out.attribute(null, "pkg", host.packageName);
1677 out.attribute(null, "id", Integer.toHexString(host.hostId));
1679 host.tag = i;
1687 out.attribute(null, "h", Integer.toHexString(id.host.tag));
1767 Host host = new Host();
1771 host.packageName = parser.getAttributeValue(null, "pkg");
1773 host.uid = getUidForPackage(host.packageName);
1775 host.zombie = true;
1777 if (!host.zombie || mSafeMode) {
1780 host.hostId = Integer
1782 mHosts.add(host);
1836 // This provider is gone. We just let the host figure out
1843 id.host = mHosts.get(hIndex);
1844 if (id.host == null) {
1845 // This host is gone.
1852 id.host.instances.add(id);
2008 if (id.host != null && id.host.callbacks != null) {
2010 id.host
2014 // we know that this host is still referenced by this
2016 id.host.callbacks = null;
2020 // Now that we've told the host, push out an update.
2063 Host host = mHosts.get(i);
2064 if (pkgName.equals(host.packageName)) {
2065 deleteHostLocked(host);
2075 Host host = mHosts.get(i);
2077 if (host.callbacks != null) {
2078 host.callbacks.providersChanged(mUserId);
2082 // we know that this host is still referenced by this
2084 host.callbacks = null;