Moficiation of the performItemAction method to handle the case when the subMenu is provided by the ActionProvider (as the Android code source does)