コード例 #1
0
ファイル: ImfUtils.java プロジェクト: manhnct/myappname
 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;
 }
コード例 #2
0
ファイル: ImfUtils.java プロジェクト: manhnct/myappname
 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;
 }
コード例 #3
0
 public boolean hasBeenModified() {
   return mSubtype != null && !mSubtype.equals(mPreviousSubtype);
 }