List of usage examples for android.view.inputmethod InputMethodInfo getServiceInfo
public ServiceInfo getServiceInfo()
From source file:io.digibyte.tools.util.Utils.java
public static boolean isUsingCustomInputMethod(Activity context) { if (context == null) return false; InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE); if (imm == null) { return false; }/*from www .j a v a 2s. c om*/ List<InputMethodInfo> mInputMethodProperties = imm.getEnabledInputMethodList(); final int N = mInputMethodProperties.size(); for (int i = 0; i < N; i++) { InputMethodInfo imi = mInputMethodProperties.get(i); if (imi.getId().equals(Settings.Secure.getString(context.getContentResolver(), Settings.Secure.DEFAULT_INPUT_METHOD))) { if ((imi.getServiceInfo().applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) == 0) { return true; } } } return false; }