private void showSubtypeAlreadyExistsToast(InputMethodSubtype subtype) {
   final Context context = getActivity();
   final Resources res = context.getResources();
   final String message =
       res.getString(
           R.string.custom_input_style_already_exists,
           SubtypeLocale.getSubtypeDisplayName(subtype, res));
   Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
 }
 public void setSubtype(InputMethodSubtype subtype) {
   mPreviousSubtype = mSubtype;
   mSubtype = subtype;
   if (isIncomplete()) {
     setTitle(null);
     setDialogTitle(R.string.add_style);
     setKey(KEY_NEW_SUBTYPE);
   } else {
     final String displayName =
         SubtypeLocale.getSubtypeDisplayName(subtype, getContext().getResources());
     setTitle(displayName);
     setDialogTitle(displayName);
     setKey(
         KEY_PREFIX
             + subtype.getLocale()
             + "_"
             + SubtypeLocale.getKeyboardLayoutSetName(subtype));
   }
 }