BroadcastRecordpublic class BroadcastRecord extends android.os.Binder An active intent broadcast. |
Fields Summary |
---|
final android.content.Intent | intent | final ProcessRecord | callerApp | final String | callerPackage | final int | callingPid | final int | callingUid | String | requiredPermission | final List | receivers | final android.app.IIntentReceiver | resultTo | long | dispatchTime | long | startTime | int | resultCode | String | resultData | android.os.Bundle | resultExtras | boolean | resultAbort | boolean | ordered | int | nextReceiver | android.os.IBinder | receiver | int | state | int | anrCount | static final int | IDLE | static final int | APP_RECEIVE | static final int | CALL_IN_RECEIVE | static final int | CALL_DONE_RECEIVE | BroadcastFilter | curFilter | ProcessRecord | curApp | android.content.ComponentName | curComponent | android.content.pm.ActivityInfo | curReceiver |
Constructors Summary |
---|
BroadcastRecord(android.content.Intent _intent, ProcessRecord _callerApp, String _callerPackage, int _callingPid, int _callingUid, String _requiredPermission, List _receivers, android.app.IIntentReceiver _resultTo, int _resultCode, String _resultData, android.os.Bundle _resultExtras, boolean _serialized)
intent = _intent;
callerApp = _callerApp;
callerPackage = _callerPackage;
callingPid = _callingPid;
callingUid = _callingUid;
requiredPermission = _requiredPermission;
receivers = _receivers;
resultTo = _resultTo;
resultCode = _resultCode;
resultData = _resultData;
resultExtras = _resultExtras;
ordered = _serialized;
nextReceiver = 0;
state = IDLE;
|
Methods Summary |
---|
void | dump(java.io.PrintWriter pw, java.lang.String prefix) // info about the receiver that is currently running.
pw.println(prefix + this);
pw.println(prefix + intent);
pw.println(prefix + "proc=" + callerApp);
pw.println(prefix + "caller=" + callerPackage
+ " callingPid=" + callingPid
+ " callingUid=" + callingUid);
pw.println(prefix + "requiredPermission=" + requiredPermission);
pw.println(prefix + "dispatchTime=" + dispatchTime + " ("
+ (SystemClock.uptimeMillis()-dispatchTime) + " since now)");
pw.println(prefix + "startTime=" + startTime + " ("
+ (SystemClock.uptimeMillis()-startTime) + " since now)");
pw.println(prefix + "anrCount=" + anrCount);
pw.println(prefix + "resultTo=" + resultTo
+ " resultCode=" + resultCode + " resultData=" + resultData);
pw.println(prefix + "resultExtras=" + resultExtras);
pw.println(prefix + "resultAbort=" + resultAbort
+ " ordered=" + ordered);
pw.println(prefix + "nextReceiver=" + nextReceiver
+ " receiver=" + receiver);
pw.println(prefix + "curFilter=" + curFilter);
pw.println(prefix + "curReceiver="
+ ((curReceiver != null) ? curReceiver : "(null)"));
pw.println(prefix + "curApp=" + curApp);
if (curApp != null) {
pw.println(prefix + "curComponent="
+ (curComponent != null ? curComponent.toShortString() : "--"));
pw.println(prefix + "curSourceDir=" + curReceiver.applicationInfo.sourceDir);
}
String stateStr = " (?)";
switch (state) {
case IDLE: stateStr=" (IDLE)"; break;
case APP_RECEIVE: stateStr=" (APP_RECEIVE)"; break;
case CALL_IN_RECEIVE: stateStr=" (CALL_IN_RECEIVE)"; break;
case CALL_DONE_RECEIVE: stateStr=" (CALL_DONE_RECEIVE)"; break;
}
pw.println(prefix + "state=" + state + stateStr);
final int N = receivers != null ? receivers.size() : 0;
String p2 = prefix + " ";
PrintWriterPrinter printer = new PrintWriterPrinter(pw);
for (int i=0; i<N; i++) {
Object o = receivers.get(i);
pw.println(prefix + "Receiver #" + i + ": " + o);
if (o instanceof BroadcastFilter)
((BroadcastFilter)o).dump(pw, p2);
else if (o instanceof ResolveInfo)
((ResolveInfo)o).dump(printer, p2);
}
| public java.lang.String | toString()
return "BroadcastRecord{"
+ Integer.toHexString(System.identityHashCode(this))
+ " " + intent.getAction() + "}";
|
|