Exemple #1
0
 public static boolean checkIfSubtypeBelongsToThisIme(Context context, InputMethodSubtype ims) {
   final InputMethodInfo myImi = getInputMethodInfoOfThisIme(context);
   final int count = myImi.getSubtypeCount();
   for (int i = 0; i < count; i++) {
     final InputMethodSubtype subtype = myImi.getSubtypeAt(i);
     if (subtype.equals(ims)) {
       return true;
     }
   }
   return false;
 }
Exemple #2
0
 public static boolean checkIfSubtypeBelongsToThisImeAndEnabled(
     Context context, InputMethodSubtype ims) {
   final InputMethodInfo myImi = getInputMethodInfoOfThisIme(context);
   final InputMethodManager imm = getInputMethodManager(context);
   // TODO: Cache all subtypes of this IME for optimization
   final List<InputMethodSubtype> subtypes = imm.getEnabledInputMethodSubtypeList(myImi, true);
   for (final InputMethodSubtype subtype : subtypes) {
     if (subtype.equals(ims)) {
       return true;
     }
   }
   return false;
 }
 public boolean hasBeenModified() {
   return mSubtype != null && !mSubtype.equals(mPreviousSubtype);
 }