public void setThemeValues(
      @NonNull KeyboardTheme keyboardTheme,
      float tabTextSize,
      ColorStateList tabTextColor,
      Drawable closeKeyboardIcon,
      Drawable backspaceIcon,
      Drawable settingsIcon,
      Drawable keyboardDrawable,
      Drawable mediaInsertionDrawable,
      Drawable deleteRecentlyUsedDrawable,
      int bottomPadding,
      Set<MediaType> supportedMediaTypes) {
    mKeyboardTheme = keyboardTheme;
    mTabTitleTextSize = tabTextSize;
    mTabTitleTextColor = tabTextColor;
    mCloseKeyboardIcon = closeKeyboardIcon;
    mBackspaceIcon = backspaceIcon;
    mSettingsIcon = settingsIcon;
    mMediaInsertionDrawable = mediaInsertionDrawable;
    mDeleteRecentlyUsedDrawable = deleteRecentlyUsedDrawable;
    mBottomPadding = bottomPadding;
    findViewById(R.id.quick_keys_popup_quick_keys_insert_media)
        .setVisibility(supportedMediaTypes.isEmpty() ? View.GONE : VISIBLE);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
      setBackground(keyboardDrawable);
    } else {
      setBackgroundDrawable(keyboardDrawable);
    }
  }
@Test
  public void testShowMediaIcon() throws Exception {
    Context context = getApplicationContext();
    mUnderTest.setThemeValues(
        mKeyboardTheme,
        10f,
        new ColorStateList(new int[][] {{0}}, new int[] {Color.WHITE}),
        context.getDrawable(R.drawable.ic_cancel),
        context.getDrawable(R.drawable.sym_keyboard_delete_light),
        context.getDrawable(R.drawable.ic_action_settings),
        context.getDrawable(R.drawable.dark_background),
        context.getDrawable(R.drawable.ic_media_insertion),
        context.getDrawable(R.drawable.ic_delete_forever_dark),
        10,
        Collections.singleton(MediaType.Image));

    Assert.assertEquals(
        View.VISIBLE,
        mUnderTest.findViewById(R.id.quick_keys_popup_quick_keys_insert_media).getVisibility());

    mUnderTest.setThemeValues(
        mKeyboardTheme,
        10f,
        new ColorStateList(new int[][] {{0}}, new int[] {Color.WHITE}),
        context.getDrawable(R.drawable.ic_cancel),
        context.getDrawable(R.drawable.sym_keyboard_delete_light),
        context.getDrawable(R.drawable.ic_action_settings),
        context.getDrawable(R.drawable.dark_background),
        context.getDrawable(R.drawable.ic_media_insertion),
        context.getDrawable(R.drawable.ic_delete_forever_dark),
        10,
        Collections.emptySet());
    Assert.assertEquals(
        View.GONE,
        mUnderTest.findViewById(R.id.quick_keys_popup_quick_keys_insert_media).getVisibility());
  }