Search in sources :

Example 6 with ContextMenuBuilder

use of com.android.internal.view.menu.ContextMenuBuilder in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class MobileNetworkActivityTest method updateBottomNavigationView_twoSubscription_updateMenu.

@Test
public void updateBottomNavigationView_twoSubscription_updateMenu() {
    final Menu menu = new ContextMenuBuilder(mContext);
    mSubscriptionInfos.add(mSubscriptionInfo);
    mSubscriptionInfos.add(mSubscriptionInfo);
    doReturn(mSubscriptionInfos).when(mSubscriptionManager).getActiveSubscriptionInfoList(eq(true));
    doReturn(menu).when(mBottomNavigationView).getMenu();
    mMobileNetworkActivity.updateBottomNavigationView();
    assertThat(menu.size()).isEqualTo(2);
}
Also used : ContextMenuBuilder(com.android.internal.view.menu.ContextMenuBuilder) Menu(android.view.Menu) Test(org.junit.Test)

Aggregations

ContextMenuBuilder (com.android.internal.view.menu.ContextMenuBuilder)6 PhoneWindowMenuCallback (com.android.internal.policy.PhoneWindow.PhoneWindowMenuCallback)5 MenuHelper (com.android.internal.view.menu.MenuHelper)5 Menu (android.view.Menu)1 Test (org.junit.Test)1