Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d65e0de authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Clarify that getLocalState is always valid for DragEvent

The method getLocalState() always returns valid data
(if the data was stored in startDragAndDrop to begin with),
but the documentation currently states that the events with
action ACTION_DRAG_ENDED do not have valid local state.

Bug: 62067188
Test: bit CtsViewTestCases:android.view.cts.DragDropTest
Change-Id: Ia2f8e5e0bb068aa7ac4aac3f18a5cf01d1a73c32
parent 2113e7cf
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ import com.android.internal.view.IDragAndDropPermissions;
 *  <tr>
 *      <td>ACTION_DRAG_ENDED</td>
 *      <td style="text-align: center;">&nbsp;</td>
 *      <td style="text-align: center;">&nbsp;</td>
 *      <td style="text-align: center;">X</td>
 *      <td style="text-align: center;">&nbsp;</td>
 *      <td style="text-align: center;">&nbsp;</td>
 *      <td style="text-align: center;">&nbsp;</td>
@@ -112,6 +112,7 @@ import com.android.internal.view.IDragAndDropPermissions;
 * </table>
 * <p>
 *  The {@link android.view.DragEvent#getAction()},
 *  {@link android.view.DragEvent#getLocalState()}
 *  {@link android.view.DragEvent#describeContents()},
 *  {@link android.view.DragEvent#writeToParcel(Parcel,int)}, and
 *  {@link android.view.DragEvent#toString()} methods always return valid data.
@@ -397,7 +398,7 @@ public class DragEvent implements Parcelable {
     * 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}.
     *  This method returns valid data for all event actions.
     * </p>
     * @return The local state object sent to the system by startDragAndDrop().
     */