if (ViewDebug.DEBUG_DRAG) {
Log.d(VIEW_LOG_TAG, "startDragAndDrop: data=" + data + " flags=" + flags);
}
+ if (mAttachInfo == null) {
+ Log.w(VIEW_LOG_TAG, "startDragAndDrop called on a detached view.");
+ return false;
+ }
boolean okay = false;
Point shadowSize = new Point();
if (ViewDebug.DEBUG_DRAG) {
Log.d(VIEW_LOG_TAG, "cancelDragAndDrop");
}
+ if (mAttachInfo == null) {
+ Log.w(VIEW_LOG_TAG, "cancelDragAndDrop called on a detached view.");
+ return;
+ }
if (mAttachInfo.mDragToken != null) {
try {
mAttachInfo.mSession.cancelDragAndDrop(mAttachInfo.mDragToken);
if (ViewDebug.DEBUG_DRAG) {
Log.d(VIEW_LOG_TAG, "updateDragShadow");
}
+ if (mAttachInfo == null) {
+ Log.w(VIEW_LOG_TAG, "updateDragShadow called on a detached view.");
+ return;
+ }
if (mAttachInfo.mDragToken != null) {
try {
Canvas canvas = mAttachInfo.mDragSurface.lockCanvas(null);