IntentBindRecordpublic final class IntentBindRecord extends Object A particular Intent that has been bound to a Service. |
Fields Summary |
---|
final ServiceRecord | serviceThe running service. | final Intent.FilterComparison | intentThe intent that is bound. | final android.util.ArrayMap | appsAll apps that have bound to this Intent. | android.os.IBinder | binderBinder published from service. | boolean | requestedSet when we have initiated a request for this binder. | boolean | receivedSet when we have received the requested binder. | boolean | hasBoundSet when we still need to tell the service all clients are unbound. | boolean | doRebindSet when the service's onUnbind() has asked to be told about new clients. | String | stringName |
Methods Summary |
---|
int | collectFlags()
int flags = 0;
for (int i=apps.size()-1; i>=0; i--) {
final ArraySet<ConnectionRecord> connections = apps.valueAt(i).connections;
for (int j=connections.size()-1; j>=0; j--) {
flags |= connections.valueAt(j).flags;
}
}
return flags;
| void | dump(java.io.PrintWriter pw, java.lang.String prefix) // caching of toString
pw.print(prefix); pw.print("service="); pw.println(service);
dumpInService(pw, prefix);
| void | dumpInService(java.io.PrintWriter pw, java.lang.String prefix)
pw.print(prefix); pw.print("intent={");
pw.print(intent.getIntent().toShortString(false, true, false, false));
pw.println('}");
pw.print(prefix); pw.print("binder="); pw.println(binder);
pw.print(prefix); pw.print("requested="); pw.print(requested);
pw.print(" received="); pw.print(received);
pw.print(" hasBound="); pw.print(hasBound);
pw.print(" doRebind="); pw.println(doRebind);
for (int i=0; i<apps.size(); i++) {
AppBindRecord a = apps.valueAt(i);
pw.print(prefix); pw.print("* Client AppBindRecord{");
pw.print(Integer.toHexString(System.identityHashCode(a)));
pw.print(' "); pw.print(a.client); pw.println('}");
a.dumpInIntentBind(pw, prefix + " ");
}
| public java.lang.String | toString()
if (stringName != null) {
return stringName;
}
StringBuilder sb = new StringBuilder(128);
sb.append("IntentBindRecord{");
sb.append(Integer.toHexString(System.identityHashCode(this)));
sb.append(' ");
if ((collectFlags()&Context.BIND_AUTO_CREATE) != 0) {
sb.append("CR ");
}
sb.append(service.shortName);
sb.append(':");
if (intent != null) {
intent.getIntent().toShortString(sb, false, false, false, false);
}
sb.append('}");
return stringName = sb.toString();
|
|