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

Commit d67b4f53 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Some fixes in ClipData and ClipDescription delivery."

parents 060437ea a61efa4c
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -20,6 +20,7 @@ import android.animation.LayoutTransition;
import android.annotation.IdRes;
import android.annotation.IdRes;
import android.annotation.NonNull;
import android.annotation.NonNull;
import android.annotation.UiThread;
import android.annotation.UiThread;
import android.content.ClipData;
import android.content.Context;
import android.content.Context;
import android.content.Intent;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager;
@@ -1380,6 +1381,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
        boolean retval = false;
        boolean retval = false;
        final float tx = event.mX;
        final float tx = event.mX;
        final float ty = event.mY;
        final float ty = event.mY;
        final ClipData td = event.mClipData;


        // Dispatch down the view hierarchy
        // Dispatch down the view hierarchy
        final PointF localPoint = getLocalPoint();
        final PointF localPoint = getLocalPoint();
@@ -1465,6 +1467,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                    // ACTION_DRAG_EXITED.
                    // ACTION_DRAG_EXITED.
                    event.mX = 0;
                    event.mX = 0;
                    event.mY = 0;
                    event.mY = 0;
                    event.mClipData = null;


                    if (mCurrentDragChild != null) {
                    if (mCurrentDragChild != null) {
                        event.mAction = DragEvent.ACTION_DRAG_EXITED;
                        event.mAction = DragEvent.ACTION_DRAG_EXITED;
@@ -1479,6 +1482,7 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
                    event.mAction = action;
                    event.mAction = action;
                    event.mX = tx;
                    event.mX = tx;
                    event.mY = ty;
                    event.mY = ty;
                    event.mClipData = td;
                }
                }
                mCurrentDragChild = target;
                mCurrentDragChild = target;
            }
            }
+4 −0
Original line number Original line Diff line number Diff line
@@ -29,6 +29,7 @@ import android.animation.LayoutTransition;
import android.annotation.NonNull;
import android.annotation.NonNull;
import android.app.ActivityManagerNative;
import android.app.ActivityManagerNative;
import android.app.ResourcesManager;
import android.app.ResourcesManager;
import android.content.ClipData;
import android.content.ClipDescription;
import android.content.ClipDescription;
import android.content.ComponentCallbacks;
import android.content.ComponentCallbacks;
import android.content.Context;
import android.content.Context;
@@ -5657,9 +5658,11 @@ public final class ViewRootImpl implements ViewParent,
            final float tx = event.mX;
            final float tx = event.mX;
            final float ty = event.mY;
            final float ty = event.mY;
            final int action = event.mAction;
            final int action = event.mAction;
            final ClipData td = event.mClipData;
            // Position should not be available for ACTION_DRAG_ENTERED and ACTION_DRAG_EXITED.
            // Position should not be available for ACTION_DRAG_ENTERED and ACTION_DRAG_EXITED.
            event.mX = 0;
            event.mX = 0;
            event.mY = 0;
            event.mY = 0;
            event.mClipData = null;


            if (mCurrentDragView != null) {
            if (mCurrentDragView != null) {
                event.mAction = DragEvent.ACTION_DRAG_EXITED;
                event.mAction = DragEvent.ACTION_DRAG_EXITED;
@@ -5674,6 +5677,7 @@ public final class ViewRootImpl implements ViewParent,
            event.mAction = action;
            event.mAction = action;
            event.mX = tx;
            event.mX = tx;
            event.mY = ty;
            event.mY = ty;
            event.mClipData = td;
        }
        }


        mCurrentDragView = newDragTarget;
        mCurrentDragView = newDragTarget;
+3 −3
Original line number Original line Diff line number Diff line
@@ -408,8 +408,8 @@ DraggableDot.java</a> in <a href="{@docRoot}resources/samples/ApiDemos/index.htm
        <td>{@link android.view.DragEvent#ACTION_DRAG_ENTERED}</td>
        <td>{@link android.view.DragEvent#ACTION_DRAG_ENTERED}</td>
        <td style="text-align: center;">X</td>
        <td style="text-align: center;">X</td>
        <td style="text-align: center;">X</td>
        <td style="text-align: center;">X</td>
        <td style="text-align: center;">X</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>
        <td style="text-align: center;">&nbsp;</td>
        <td style="text-align: center;">&nbsp;</td>
    </tr>
    </tr>
@@ -442,7 +442,7 @@ DraggableDot.java</a> in <a href="{@docRoot}resources/samples/ApiDemos/index.htm
    </tr>
    </tr>
    <tr>
    <tr>
        <td>{@link android.view.DragEvent#ACTION_DRAG_ENDED}</td>
        <td>{@link android.view.DragEvent#ACTION_DRAG_ENDED}</td>
        <td style="text-align: center;">X</td>
        <td style="text-align: center;">&nbsp;</td>
        <td style="text-align: center;">X</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>
        <td style="text-align: center;">&nbsp;</td>