Commit d01f368a authored by kkimlabs@chromium.org's avatar kkimlabs@chromium.org

[Android] Remove hardware menu button dragging support.

This code path was broken sometime within a year, and we don't think
it's worth to support this more.

BUG=366154

Review URL: https://codereview.chromium.org/317083005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275395 0039d316-1c4b-4281-b951-d872f2087c98
parent 85317221
...@@ -57,12 +57,14 @@ public class AppMenuHandler { ...@@ -57,12 +57,14 @@ public class AppMenuHandler {
* @param startDragging Whether dragging is started. For example, if the app menu is * @param startDragging Whether dragging is started. For example, if the app menu is
* showed by tapping on a button, this should be false. If it is * showed by tapping on a button, this should be false. If it is
* showed by start dragging down on the menu button, this should * showed by start dragging down on the menu button, this should
* be true. Note that if isByHardwareButton is true, this is * be true. Note that if isByHardwareButton is true, this must
* ignored. * be false since we no longer support hardware menu button
* dragging.
* @return True, if the menu is shown, false, if menu is not shown, example reasons: * @return True, if the menu is shown, false, if menu is not shown, example reasons:
* the menu is not yet available to be shown, or the menu is already showing. * the menu is not yet available to be shown, or the menu is already showing.
*/ */
public boolean showAppMenu(View anchorView, boolean isByHardwareButton, boolean startDragging) { public boolean showAppMenu(View anchorView, boolean isByHardwareButton, boolean startDragging) {
assert !(isByHardwareButton && startDragging);
if (!mDelegate.shouldShowAppMenu() || isAppMenuShowing()) return false; if (!mDelegate.shouldShowAppMenu() || isAppMenuShowing()) return false;
if (mMenu == null) { if (mMenu == null) {
...@@ -93,7 +95,7 @@ public class AppMenuHandler { ...@@ -93,7 +95,7 @@ public class AppMenuHandler {
mActivity.getWindow().getDecorView().getWindowVisibleDisplayFrame(appRect); mActivity.getWindow().getDecorView().getWindowVisibleDisplayFrame(appRect);
int rotation = mActivity.getWindowManager().getDefaultDisplay().getRotation(); int rotation = mActivity.getWindowManager().getDefaultDisplay().getRotation();
mAppMenu.show(wrapper, anchorView, isByHardwareButton, rotation, appRect); mAppMenu.show(wrapper, anchorView, isByHardwareButton, rotation, appRect);
mAppMenuDragHelper.onShow(isByHardwareButton, startDragging); mAppMenuDragHelper.onShow(startDragging);
UmaBridge.menuShow(); UmaBridge.menuShow();
return true; return true;
} }
...@@ -157,11 +159,4 @@ public class AppMenuHandler { ...@@ -157,11 +159,4 @@ public class AppMenuHandler {
mObservers.get(i).onMenuVisibilityChanged(isVisible); mObservers.get(i).onMenuVisibilityChanged(isVisible);
} }
} }
/**
* TODO(kkimlabs) remove this call.
*/
public void hardwareMenuButtonUp() {
if (mAppMenuDragHelper != null) mAppMenuDragHelper.hardwareMenuButtonUp();
}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment