summaryrefslogtreecommitdiff
path: root/core/java/android/content/BroadcastReceiver.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-01-17 14:38:50 -0800
committerDianne Hackborn <hackbod@google.com>2011-01-17 16:23:42 -0800
commit327fbd2c8fa294b919475feb4c74a74ee1981e02 (patch)
tree29cbf174cb8d501b1a52252f274fb33d650df3a4 /core/java/android/content/BroadcastReceiver.java
parentf2bc4ee97f58ad7ea78da1f100dceed57c1484f1 (diff)
Fix a bunch of API review bugs.
3362464 API REVIEW: android.content potpourri 3362445 API REVIEW: Fragment transaction stuff 3362428 API REVIEW: Fragment stuff 3362418 API REVIEW: Loader stuff 3362414 API REVIEW: android.content.pm.ActivityInfo Change-Id: I6475421a4735759b458acb67df4380cc6234f147
Diffstat (limited to 'core/java/android/content/BroadcastReceiver.java')
-rw-r--r--core/java/android/content/BroadcastReceiver.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/content/BroadcastReceiver.java b/core/java/android/content/BroadcastReceiver.java
index 5939643e85a8..028149b3760b 100644
--- a/core/java/android/content/BroadcastReceiver.java
+++ b/core/java/android/content/BroadcastReceiver.java
@@ -170,6 +170,16 @@ public abstract class BroadcastReceiver {
* State for a result that is pending for a broadcast receiver. Returned
* by {@link BroadcastReceiver#goAsync() goAsync()}
* while in {@link BroadcastReceiver#onReceive BroadcastReceiver.onReceive()}.
+ * This allows you to return from onReceive() without having the broadcast
+ * terminate; you must call {@link #finish()} once you are done with the
+ * broadcast. This allows you to process the broadcast off of the main
+ * thread of your app.
+ *
+ * <p>Note on threading: the state inside of this class is not itself
+ * thread-safe, however you can use it from any thread if you properly
+ * sure that you do not have races. Typically this means you will hand
+ * the entire object to another thread, which will be solely responsible
+ * for setting any results and finally calling {@link #finish()}.
*/
public static class PendingResult {
/** @hide */