Loading core/java/com/android/internal/view/menu/MenuBuilder.java +0 −8 Original line number Diff line number Diff line Loading @@ -65,7 +65,6 @@ public class MenuBuilder implements Menu { private final Context mContext; private final Resources mResources; private final boolean mShowCascadingMenus; /** * Whether the shortcuts should be qwerty-accessible. Use isQwertyMode() Loading Loading @@ -188,9 +187,6 @@ public class MenuBuilder implements Menu { public MenuBuilder(Context context) { mContext = context; mResources = context.getResources(); mShowCascadingMenus = context.getResources().getBoolean( com.android.internal.R.bool.config_enableCascadingSubmenus); mItems = new ArrayList<MenuItemImpl>(); mVisibleItems = new ArrayList<MenuItemImpl>(); Loading Loading @@ -915,10 +911,6 @@ public class MenuBuilder implements Menu { close(true /* closeAllMenus */); } } else if (itemImpl.hasSubMenu() || providerHasSubMenu) { if (!mShowCascadingMenus) { close(false /* closeAllMenus */); } if (!itemImpl.hasSubMenu()) { itemImpl.setSubMenu(new SubMenuBuilder(getContext(), this, itemImpl)); } Loading core/java/com/android/internal/view/menu/StandardMenuPopup.java +11 −1 Original line number Diff line number Diff line Loading @@ -240,8 +240,11 @@ final class StandardMenuPopup extends MenuPopup implements OnDismissListener, On mTreeObserver = null; } mShownAnchorView.removeOnAttachStateChangeListener(mAttachStateChangeListener); if (mOnDismissListener != null) { mOnDismissListener.onDismiss(); } } @Override public void updateMenuView(boolean cleared) { Loading @@ -265,6 +268,13 @@ final class StandardMenuPopup extends MenuPopup implements OnDismissListener, On subPopup.setPresenterCallback(mPresenterCallback); subPopup.setForceShowIcon(mAdapter.getForceShowIcon()); // Pass responsibility for handling onDismiss to the submenu. subPopup.setOnDismissListener(mOnDismissListener); mOnDismissListener = null; // Close this menu popup to make room for the submenu popup. dismiss(); // Show the new sub-menu popup at the same location as this popup. if (subPopup.tryShow(mXOffset, mYOffset)) { if (mPresenterCallback != null) { Loading Loading
core/java/com/android/internal/view/menu/MenuBuilder.java +0 −8 Original line number Diff line number Diff line Loading @@ -65,7 +65,6 @@ public class MenuBuilder implements Menu { private final Context mContext; private final Resources mResources; private final boolean mShowCascadingMenus; /** * Whether the shortcuts should be qwerty-accessible. Use isQwertyMode() Loading Loading @@ -188,9 +187,6 @@ public class MenuBuilder implements Menu { public MenuBuilder(Context context) { mContext = context; mResources = context.getResources(); mShowCascadingMenus = context.getResources().getBoolean( com.android.internal.R.bool.config_enableCascadingSubmenus); mItems = new ArrayList<MenuItemImpl>(); mVisibleItems = new ArrayList<MenuItemImpl>(); Loading Loading @@ -915,10 +911,6 @@ public class MenuBuilder implements Menu { close(true /* closeAllMenus */); } } else if (itemImpl.hasSubMenu() || providerHasSubMenu) { if (!mShowCascadingMenus) { close(false /* closeAllMenus */); } if (!itemImpl.hasSubMenu()) { itemImpl.setSubMenu(new SubMenuBuilder(getContext(), this, itemImpl)); } Loading
core/java/com/android/internal/view/menu/StandardMenuPopup.java +11 −1 Original line number Diff line number Diff line Loading @@ -240,8 +240,11 @@ final class StandardMenuPopup extends MenuPopup implements OnDismissListener, On mTreeObserver = null; } mShownAnchorView.removeOnAttachStateChangeListener(mAttachStateChangeListener); if (mOnDismissListener != null) { mOnDismissListener.onDismiss(); } } @Override public void updateMenuView(boolean cleared) { Loading @@ -265,6 +268,13 @@ final class StandardMenuPopup extends MenuPopup implements OnDismissListener, On subPopup.setPresenterCallback(mPresenterCallback); subPopup.setForceShowIcon(mAdapter.getForceShowIcon()); // Pass responsibility for handling onDismiss to the submenu. subPopup.setOnDismissListener(mOnDismissListener); mOnDismissListener = null; // Close this menu popup to make room for the submenu popup. dismiss(); // Show the new sub-menu popup at the same location as this popup. if (subPopup.tryShow(mXOffset, mYOffset)) { if (mPresenterCallback != null) { Loading