Merge "Add Samsung print recommendation plugin." into nyc-dev am: b4a45472bb am: 8bfb5b971d

am: 27f54d6001

* commit '27f54d600109a68c6bf42848118448f1d59727e1':
  Changes based on API council feedback for performContextClick

Change-Id: I86569c06e5b587ddd9172e4e8e2d8efa98f209d4
This commit is contained in:
Mady Mellor
2016-05-25 19:22:06 +00:00
committed by android-build-merger
4 changed files with 16 additions and 1 deletions

View File

@@ -5697,6 +5697,18 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
return handled;
}
/**
* Call this view's OnContextClickListener, if it is defined.
*
* @param x the x coordinate of the context click
* @param y the y coordinate of the context click
* @return True if there was an assigned OnContextClickListener that consumed the event, false
* otherwise.
*/
public boolean performContextClick(float x, float y) {
return performContextClick();
}
/**
* Call this view's OnContextClickListener, if it is defined.
*
@@ -10048,7 +10060,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
if (isContextClickable() && !mInContextButtonPress && !mHasPerformedLongPress
&& (actionButton == MotionEvent.BUTTON_STYLUS_PRIMARY
|| actionButton == MotionEvent.BUTTON_SECONDARY)) {
if (performContextClick()) {
if (performContextClick(event.getX(), event.getY())) {
mInContextButtonPress = true;
setPressed(true, event.getX(), event.getY());
removeTapCallback();