summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2012-03-05 15:57:13 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-03-05 15:57:13 -0800
commit3edd8f06cb5538d0f6cb7e9ca844237111802470 (patch)
tree5089c08887853cf7428ec02d06f99e1b588cd526 /core
parentfaeac2737de098269a69011f4980a412559b55a9 (diff)
parentde88dba17cd1021bad39b4f80b4387a157c0dce3 (diff)
downloadframeworks_base-3edd8f06cb5538d0f6cb7e9ca844237111802470.zip
frameworks_base-3edd8f06cb5538d0f6cb7e9ca844237111802470.tar.gz
frameworks_base-3edd8f06cb5538d0f6cb7e9ca844237111802470.tar.bz2
Merge "Clarify docs for the thread used in BroadcastReceiver.onReceive()"
Diffstat (limited to 'core')
-rw-r--r--core/java/android/content/BroadcastReceiver.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/java/android/content/BroadcastReceiver.java b/core/java/android/content/BroadcastReceiver.java
index b609c26..9ddb2a6 100644
--- a/core/java/android/content/BroadcastReceiver.java
+++ b/core/java/android/content/BroadcastReceiver.java
@@ -446,13 +446,17 @@ public abstract class BroadcastReceiver {
/**
* This method is called when the BroadcastReceiver is receiving an Intent
* broadcast. During this time you can use the other methods on
- * BroadcastReceiver to view/modify the current result values. The function
- * is normally called within the main thread of its process, so you should
+ * BroadcastReceiver to view/modify the current result values. This method
+ * is always called within the main thread of its process, unless you
+ * explicitly asked for it to be scheduled on a different thread using
+ * {@link android.content.Context#registerReceiver(BroadcastReceiver,
+ * IntentFilter, String, android.os.Handler)}. When it runs on the main
+ * thread you should
* never perform long-running operations in it (there is a timeout of
* 10 seconds that the system allows before considering the receiver to
* be blocked and a candidate to be killed). You cannot launch a popup dialog
* in your implementation of onReceive().
- *
+ *
* <p><b>If this BroadcastReceiver was launched through a &lt;receiver&gt; tag,
* then the object is no longer alive after returning from this
* function.</b> This means you should not perform any operations that