diff options
Diffstat (limited to 'core/java/android/view/View.java')
| -rw-r--r-- | core/java/android/view/View.java | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index 258359e98264..02f372fcb19a 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -14248,34 +14248,34 @@ public class View implements Drawable.Callback, KeyEvent.Callback, hideTooltip(); return true; } - } - - if (action == R.id.accessibilityActionDragDrop) { - if (!canAcceptAccessibilityDrop()) { + case R.id.accessibilityActionDragDrop: { + if (!canAcceptAccessibilityDrop()) { + return false; + } + try { + if (mAttachInfo != null && mAttachInfo.mSession != null) { + final int[] location = new int[2]; + getLocationInWindow(location); + final int centerX = location[0] + getWidth() / 2; + final int centerY = location[1] + getHeight() / 2; + return mAttachInfo.mSession.dropForAccessibility(mAttachInfo.mWindow, + centerX, centerY); + } + } catch (RemoteException e) { + Log.e(VIEW_LOG_TAG, "Unable to drop for accessibility", e); + } return false; } - try { - if (mAttachInfo != null && mAttachInfo.mSession != null) { - final int[] location = new int[2]; - getLocationInWindow(location); - final int centerX = location[0] + getWidth() / 2; - final int centerY = location[1] + getHeight() / 2; - return mAttachInfo.mSession.dropForAccessibility(mAttachInfo.mWindow, - centerX, centerY); + case R.id.accessibilityActionDragCancel: { + if (!startedSystemDragForAccessibility()) { + return false; + } + if (mAttachInfo != null && mAttachInfo.mDragToken != null) { + cancelDragAndDrop(); + return true; } - } catch (RemoteException e) { - Log.e(VIEW_LOG_TAG, "Unable to drop for accessibility", e); - } - return false; - } else if (action == R.id.accessibilityActionDragCancel) { - if (!startedSystemDragForAccessibility()) { return false; } - if (mAttachInfo != null && mAttachInfo.mDragToken != null) { - cancelDragAndDrop(); - return true; - } - return false; } return false; } |
