Loading core/java/android/view/View.java +2 −2 Original line number Diff line number Diff line Loading @@ -5750,9 +5750,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * view-relative coordinate. * * @param x the X coordinate in pixels relative to the view to which the * menu should be anchored * menu should be anchored, or {@link Float#NaN} to disable anchoring * @param y the Y coordinate in pixels relative to the view to which the * menu should be anchored * menu should be anchored, or {@link Float#NaN} to disable anchoring * @return {@code true} if the context menu was shown, {@code false} * otherwise */ Loading core/java/android/view/ViewParent.java +4 −2 Original line number Diff line number Diff line Loading @@ -199,9 +199,11 @@ public interface ViewParent { * @param originalView the source view where the context menu was first * invoked * @param x the X coordinate in pixels relative to the original view to * which the menu should be anchored * which the menu should be anchored, or {@link Float#NaN} to * disable anchoring * @param y the Y coordinate in pixels relative to the original view to * which the menu should be anchored * which the menu should be anchored, or {@link Float#NaN} to * disable anchoring * @return {@code true} if the context menu was shown, {@code false} * otherwise */ Loading core/java/com/android/internal/policy/DecorView.java +4 −3 Original line number Diff line number Diff line Loading @@ -733,16 +733,16 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind @Override public boolean showContextMenuForChild(View originalView) { return showContextMenuForChildInternal(originalView, 0, 0, false); return showContextMenuForChildInternal(originalView, Float.NaN, Float.NaN); } @Override public boolean showContextMenuForChild(View originalView, float x, float y) { return showContextMenuForChildInternal(originalView, x, y, true); return showContextMenuForChildInternal(originalView, x, y); } private boolean showContextMenuForChildInternal(View originalView, float x, float y, boolean isPopup) { float x, float y) { // Only allow one context menu at a time. if (mWindow.mContextMenuHelper != null) { mWindow.mContextMenuHelper.dismiss(); Loading @@ -759,6 +759,7 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind } final MenuHelper helper; final boolean isPopup = !Float.isNaN(x) && !Float.isNaN(y); if (isPopup) { helper = mWindow.mContextMenu.showPopup(getContext(), originalView, x, y); } else { Loading Loading
core/java/android/view/View.java +2 −2 Original line number Diff line number Diff line Loading @@ -5750,9 +5750,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * view-relative coordinate. * * @param x the X coordinate in pixels relative to the view to which the * menu should be anchored * menu should be anchored, or {@link Float#NaN} to disable anchoring * @param y the Y coordinate in pixels relative to the view to which the * menu should be anchored * menu should be anchored, or {@link Float#NaN} to disable anchoring * @return {@code true} if the context menu was shown, {@code false} * otherwise */ Loading
core/java/android/view/ViewParent.java +4 −2 Original line number Diff line number Diff line Loading @@ -199,9 +199,11 @@ public interface ViewParent { * @param originalView the source view where the context menu was first * invoked * @param x the X coordinate in pixels relative to the original view to * which the menu should be anchored * which the menu should be anchored, or {@link Float#NaN} to * disable anchoring * @param y the Y coordinate in pixels relative to the original view to * which the menu should be anchored * which the menu should be anchored, or {@link Float#NaN} to * disable anchoring * @return {@code true} if the context menu was shown, {@code false} * otherwise */ Loading
core/java/com/android/internal/policy/DecorView.java +4 −3 Original line number Diff line number Diff line Loading @@ -733,16 +733,16 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind @Override public boolean showContextMenuForChild(View originalView) { return showContextMenuForChildInternal(originalView, 0, 0, false); return showContextMenuForChildInternal(originalView, Float.NaN, Float.NaN); } @Override public boolean showContextMenuForChild(View originalView, float x, float y) { return showContextMenuForChildInternal(originalView, x, y, true); return showContextMenuForChildInternal(originalView, x, y); } private boolean showContextMenuForChildInternal(View originalView, float x, float y, boolean isPopup) { float x, float y) { // Only allow one context menu at a time. if (mWindow.mContextMenuHelper != null) { mWindow.mContextMenuHelper.dismiss(); Loading @@ -759,6 +759,7 @@ public class DecorView extends FrameLayout implements RootViewSurfaceTaker, Wind } final MenuHelper helper; final boolean isPopup = !Float.isNaN(x) && !Float.isNaN(y); if (isPopup) { helper = mWindow.mContextMenu.showPopup(getContext(), originalView, x, y); } else { Loading