From 327fbd2c8fa294b919475feb4c74a74ee1981e02 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Mon, 17 Jan 2011 14:38:50 -0800 Subject: 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 --- core/java/android/content/BroadcastReceiver.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'core/java/android/content/BroadcastReceiver.java') 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. + * + *

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 */ -- cgit v1.2.3