summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-08-11 11:44:11 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-11 11:44:11 -0700
commit7277f3b9b26f0011475b39da1298484a510aca29 (patch)
treef16ba8bfd7895f1b3232ffb38cfc429ccf070627
parent24c2d6bc8265b7524b1c8cbf2234c9f2f4667cc1 (diff)
parente63a4f35c94f32dbc13533ddfb7334f9706be844 (diff)
downloadframeworks_base-7277f3b9b26f0011475b39da1298484a510aca29.zip
frameworks_base-7277f3b9b26f0011475b39da1298484a510aca29.tar.gz
frameworks_base-7277f3b9b26f0011475b39da1298484a510aca29.tar.bz2
Merge "Document threading limitations on various View methods Bug #5150923"
-rw-r--r--core/java/android/view/View.java47
1 files changed, 34 insertions, 13 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index ad76928..5b77cf7 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -8318,8 +8318,11 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
}
/**
- * Causes the Runnable to be added to the message queue.
- * The runnable will be run on the user interface thread.
+ * <p>Causes the Runnable to be added to the message queue.
+ * The runnable will be run on the user interface thread.</p>
+ *
+ * <p>This method can be invoked from outside of the UI thread
+ * only when this View is attached to a window.</p>
*
* @param action The Runnable that will be executed.
*
@@ -8342,9 +8345,12 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
}
/**
- * Causes the Runnable to be added to the message queue, to be run
+ * <p>Causes the Runnable to be added to the message queue, to be run
* after the specified amount of time elapses.
- * The runnable will be run on the user interface thread.
+ * The runnable will be run on the user interface thread.</p>
+ *
+ * <p>This method can be invoked from outside of the UI thread
+ * only when this View is attached to a window.</p>
*
* @param action The Runnable that will be executed.
* @param delayMillis The delay (in milliseconds) until the Runnable
@@ -8372,7 +8378,10 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
}
/**
- * Removes the specified Runnable from the message queue.
+ * <p>Removes the specified Runnable from the message queue.</p>
+ *
+ * <p>This method can be invoked from outside of the UI thread
+ * only when this View is attached to a window.</p>
*
* @param action The Runnable to remove from the message handling queue
*
@@ -8397,9 +8406,12 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
}
/**
- * Cause an invalidate to happen on a subsequent cycle through the event loop.
- * Use this to invalidate the View from a non-UI thread.
+ * <p>Cause an invalidate to happen on a subsequent cycle through the event loop.
+ * Use this to invalidate the View from a non-UI thread.</p>
*
+ * <p>This method can be invoked from outside of the UI thread
+ * only when this View is attached to a window.</p>
+ *
* @see #invalidate()
*/
public void postInvalidate() {
@@ -8407,8 +8419,11 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
}
/**
- * Cause an invalidate of the specified area to happen on a subsequent cycle
- * through the event loop. Use this to invalidate the View from a non-UI thread.
+ * <p>Cause an invalidate of the specified area to happen on a subsequent cycle
+ * through the event loop. Use this to invalidate the View from a non-UI thread.</p>
+ *
+ * <p>This method can be invoked from outside of the UI thread
+ * only when this View is attached to a window.</p>
*
* @param left The left coordinate of the rectangle to invalidate.
* @param top The top coordinate of the rectangle to invalidate.
@@ -8423,8 +8438,11 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
}
/**
- * Cause an invalidate to happen on a subsequent cycle through the event
- * loop. Waits for the specified amount of time.
+ * <p>Cause an invalidate to happen on a subsequent cycle through the event
+ * loop. Waits for the specified amount of time.</p>
+ *
+ * <p>This method can be invoked from outside of the UI thread
+ * only when this View is attached to a window.</p>
*
* @param delayMilliseconds the duration in milliseconds to delay the
* invalidation by
@@ -8442,8 +8460,11 @@ public class View implements Drawable.Callback2, KeyEvent.Callback, Accessibilit
}
/**
- * Cause an invalidate of the specified area to happen on a subsequent cycle
- * through the event loop. Waits for the specified amount of time.
+ * <p>Cause an invalidate of the specified area to happen on a subsequent cycle
+ * through the event loop. Waits for the specified amount of time.</p>
+ *
+ * <p>This method can be invoked from outside of the UI thread
+ * only when this View is attached to a window.</p>
*
* @param delayMilliseconds the duration in milliseconds to delay the
* invalidation by