synchronized void addFlexibleSpacing(int index) {
    final SpacingItem spacing = new SpacingItem();
    spacing.setUid("static_touchbar_item_flexible_space");
    if (index >= 0 && index < myItems.size()) {
      myItems.add(index, spacing);
    }
    else {
      myItems.add(spacing);
    }
  }
synchronized void addFlexibleSpacing(int index)