summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Christie <dnchrist@google.com>2013-12-19 18:30:06 -0800
committerDavid Christie <dnchrist@google.com>2013-12-19 18:37:01 -0800
commita8cf4f2fd1f72e3fa6ded96e1516ea1788fe3a25 (patch)
tree867024c16aef480d0137c5a8f5d44a099ec66b53
parent3bc26143dc81267beba26e50965b4835cf73fdf8 (diff)
downloadframeworks_base-a8cf4f2fd1f72e3fa6ded96e1516ea1788fe3a25.zip
frameworks_base-a8cf4f2fd1f72e3fa6ded96e1516ea1788fe3a25.tar.gz
frameworks_base-a8cf4f2fd1f72e3fa6ded96e1516ea1788fe3a25.tar.bz2
Document that Handler.postDelayed uses uptimeMillis() based counting.
-Make it clear that delay may be longer than requested. -Potentially help developers avoid power bugs (e.g. releasing after delay). Bug: 12015795 Change-Id: I8034466f6307f64bfcad985948c1dc06872297d3
-rw-r--r--core/java/android/os/Handler.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/os/Handler.java b/core/java/android/os/Handler.java
index e6886c4..44367f3 100644
--- a/core/java/android/os/Handler.java
+++ b/core/java/android/os/Handler.java
@@ -330,6 +330,7 @@ public class Handler {
* Causes the Runnable r to be added to the message queue, to be run
* at a specific time given by <var>uptimeMillis</var>.
* <b>The time-base is {@link android.os.SystemClock#uptimeMillis}.</b>
+ * Time spent in deep sleep will add an additional delay to execution.
* The runnable will be run on the thread to which this handler is attached.
*
* @param r The Runnable that will be executed.
@@ -352,6 +353,7 @@ public class Handler {
* Causes the Runnable r to be added to the message queue, to be run
* at a specific time given by <var>uptimeMillis</var>.
* <b>The time-base is {@link android.os.SystemClock#uptimeMillis}.</b>
+ * Time spent in deep sleep will add an additional delay to execution.
* The runnable will be run on the thread to which this handler is attached.
*
* @param r The Runnable that will be executed.
@@ -377,6 +379,8 @@ public class Handler {
* after the specified amount of time elapses.
* The runnable will be run on the thread to which this handler
* is attached.
+ * <b>The time-base is {@link android.os.SystemClock#uptimeMillis}.</b>
+ * Time spent in deep sleep will add an additional delay to execution.
*
* @param r The Runnable that will be executed.
* @param delayMillis The delay (in milliseconds) until the Runnable
@@ -570,6 +574,7 @@ public class Handler {
* Enqueue a message into the message queue after all pending messages
* before the absolute time (in milliseconds) <var>uptimeMillis</var>.
* <b>The time-base is {@link android.os.SystemClock#uptimeMillis}.</b>
+ * Time spent in deep sleep will add an additional delay to execution.
* You will receive it in {@link #handleMessage}, in the thread attached
* to this handler.
*