@Override
  public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {
    super.onCreateContextMenu(menu, v, menuInfo);
    AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo;
    PinInfo selectedUser = users[(int) info.id];
    getMenuInflater().inflate(R.menu.account_list_context, menu);
    menu.setHeaderTitle(selectedUser.getIndex().getStrippedName());

    if (!isRenameAccountAvailableSupported(selectedUser)) {
      menu.removeItem(R.id.rename);
    }

    if (!isCheckAccountKeyValueSupported(selectedUser)) {
      menu.removeItem(R.id.check_code);
    }

    mostRecentContextMenu = menu;
  }
Displays or hides, as needed, the notice that appears after the first account was added. When
displayed, the notice replaces the default "enter PIN" prompt above the list of accounts.
java/com/google/android/apps/authenticator/AuthenticatorActivity.java