FileDocCategorySizeDatePackage
ReceiverList.javaAPI DocAndroid 5.1 API3868Thu Mar 12 22:22:42 GMT 2015com.android.server.am

ReceiverList

public final class ReceiverList extends ArrayList implements IBinder.DeathRecipient
A receiver object that has registered for one or more broadcasts. The ArrayList holds BroadcastFilter objects.

Fields Summary
final ActivityManagerService
owner
public final android.content.IIntentReceiver
receiver
public final ProcessRecord
app
public final int
pid
public final int
uid
public final int
userId
BroadcastRecord
curBroadcast
boolean
linkedToDeath
String
stringName
Constructors Summary
ReceiverList(ActivityManagerService _owner, ProcessRecord _app, int _pid, int _uid, int _userId, android.content.IIntentReceiver _receiver)

    
       
                    
        owner = _owner;
        receiver = _receiver;
        app = _app;
        pid = _pid;
        uid = _uid;
        userId = _userId;
    
Methods Summary
public voidbinderDied()

        linkedToDeath = false;
        owner.unregisterReceiver(receiver);
    
voiddump(java.io.PrintWriter pw, java.lang.String prefix)

        Printer pr = new PrintWriterPrinter(pw);
        dumpLocal(pw, prefix);
        String p2 = prefix + "  ";
        final int N = size();
        for (int i=0; i<N; i++) {
            BroadcastFilter bf = get(i);
            pw.print(prefix); pw.print("Filter #"); pw.print(i);
                    pw.print(": BroadcastFilter{");
                    pw.print(Integer.toHexString(System.identityHashCode(bf)));
                    pw.println('}");
            bf.dumpInReceiverList(pw, pr, p2);
        }
    
voiddumpLocal(java.io.PrintWriter pw, java.lang.String prefix)

        pw.print(prefix); pw.print("app="); pw.print(app != null ? app.toShortString() : null);
            pw.print(" pid="); pw.print(pid); pw.print(" uid="); pw.print(uid);
            pw.print(" user="); pw.println(userId);
        if (curBroadcast != null || linkedToDeath) {
            pw.print(prefix); pw.print("curBroadcast="); pw.print(curBroadcast);
                pw.print(" linkedToDeath="); pw.println(linkedToDeath);
        }
    
public booleanequals(java.lang.Object o)

        return this == o;
    
public inthashCode()

        return System.identityHashCode(this);
    
public java.lang.StringtoString()

        if (stringName != null) {
            return stringName;
        }
        StringBuilder sb = new StringBuilder(128);
        sb.append("ReceiverList{");
        sb.append(Integer.toHexString(System.identityHashCode(this)));
        sb.append(' ");
        sb.append(pid);
        sb.append(' ");
        sb.append((app != null ? app.processName : "(unknown name)"));
        sb.append('/");
        sb.append(uid);
        sb.append("/u");
        sb.append(userId);
        sb.append((receiver.asBinder() instanceof Binder) ? " local:" : " remote:");
        sb.append(Integer.toHexString(System.identityHashCode(receiver.asBinder())));
        sb.append('}");
        return stringName = sb.toString();