// open menu, move around to give it focus
sendKeys(KeyEvent.KEYCODE_MENU, KeyEvent.KEYCODE_DPAD_LEFT);
final View menuItem = mActivity.getItemView(MenuBuilder.TYPE_ICON, 0);
assertTrue("menuItem.isFocused()", menuItem.isFocused());
// close the menu
sendKeys(KeyEvent.KEYCODE_MENU);
Thread.sleep(500);
// touch the screen
TouchUtils.clickView(this, mActivity.getButton());
assertTrue("should be in touch mode after touching button",
mActivity.getButton().isInTouchMode());
// open the menu, menu item shouldn't be focused, because we are not
// in touch mode
sendKeys(KeyEvent.KEYCODE_MENU);
assertTrue("menuItem.isInTouchMode()", menuItem.isInTouchMode());
assertFalse("menuItem.isFocused()", menuItem.isFocused());