diff options
author | Nick Pelly <npelly@google.com> | 2012-03-02 15:25:31 -0800 |
---|---|---|
committer | Nick Pelly <npelly@google.com> | 2012-03-02 15:25:31 -0800 |
commit | de88dba17cd1021bad39b4f80b4387a157c0dce3 (patch) | |
tree | 946b8ab3cab78ec195364e72dbd1a6585dc85111 /core/java/android/content/BroadcastReceiver.java | |
parent | c81ec3637b8e3c177ec041aeb3863e123924505b (diff) | |
download | frameworks_base-de88dba17cd1021bad39b4f80b4387a157c0dce3.zip frameworks_base-de88dba17cd1021bad39b4f80b4387a157c0dce3.tar.gz frameworks_base-de88dba17cd1021bad39b4f80b4387a157c0dce3.tar.bz2 |
Clarify docs for the thread used in BroadcastReceiver.onReceive()
Change-Id: Ib6c0da5d0ca2fc95b26b230b306f205a9942cf03
Diffstat (limited to 'core/java/android/content/BroadcastReceiver.java')
-rw-r--r-- | core/java/android/content/BroadcastReceiver.java | 10 |
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 <receiver> tag, * then the object is no longer alive after returning from this * function.</b> This means you should not perform any operations that |