Close context menu dialogs if the menu becomes empty

If a view triggers showContextMenu while a context menu is already
shown but contributes no items to the menu the menu dialog would
become empty. Simply close the dialog if this happens.

Bug 11063885

Change-Id: I9e7c96073318c94eda5f1e1c4beb596b3d9da781
1 file changed