summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Vladislav Kaznacheev <kaznacheev@google.com> 2016-09-13 08:18:00 +0000
committer android-build-merger <android-build-merger@google.com> 2016-09-13 08:18:00 +0000
commit048cc637c75be1372115da99afa1dbabd402708c (patch)
tree362c0aca6fb67ec94851bf24802064fe99a92621
parent3abb05cd65a31b8a82683071ef303f534afb6f1d (diff)
parentad4df22dc68a11fe401e2198f35b404e6fadf1af (diff)
Update JavaDoc for DragEvent.getLocalState am: 048f3bfaf0 am: f96d962aac
am: ad4df22dc6 Change-Id: Ic45bc7172e9dcdb5f58db23809a38f0fb5b5da52
-rw-r--r--core/java/android/view/DragEvent.java4
-rw-r--r--core/java/android/view/View.java6
2 files changed, 8 insertions, 2 deletions
diff --git a/core/java/android/view/DragEvent.java b/core/java/android/view/DragEvent.java
index b0f15b5f2329..a394f351b7f3 100644
--- a/core/java/android/view/DragEvent.java
+++ b/core/java/android/view/DragEvent.java
@@ -377,6 +377,10 @@ public class DragEvent implements Parcelable {
* The object is intended to provide local information about the drag and drop operation. For
* example, it can indicate whether the drag and drop operation is a copy or a move.
* <p>
+ * The local state is available only to views in the activity which has started the drag
+ * operation. In all other activities this method will return null
+ * </p>
+ * <p>
* This method returns valid data for all event actions except for {@link #ACTION_DRAG_ENDED}.
* </p>
* @return The local state object sent to the system by startDrag().
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 79bdc004ae67..a7337d2581ca 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -20657,8 +20657,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* @param shadowBuilder A {@link android.view.View.DragShadowBuilder} object for building the
* drag shadow.
* @param myLocalState An {@link java.lang.Object} containing local data about the drag and
- * drop operation. This Object is put into every DragEvent object sent by the system during the
- * current drag.
+ * drop operation. When dispatching drag events to views in the same activity this object
+ * will be available through {@link android.view.DragEvent#getLocalState()}. Views in other
+ * activities will not have access to this data ({@link android.view.DragEvent#getLocalState()}
+ * will return null).
* <p>
* myLocalState is a lightweight mechanism for the sending information from the dragged View
* to the target Views. For example, it can contain flags that differentiate between a