public void onNetworkStateChanged(Intent intent) {
    final boolean noConnection =
        intent.getBooleanExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, false);
    mIsNetworkConnected = !noConnection;

    final KeyboardSwitcher switcher = KeyboardSwitcher.getInstance();
    final LatinKeyboard keyboard = switcher.getLatinKeyboard();
    if (keyboard != null) {
      keyboard.updateShortcutKey(isShortcutImeReady(), switcher.getKeyboardView());
    }
  }
 private void triggerVoiceIME() {
   if (!mService.isInputViewShown()) return;
   VoiceProxy.getInstance()
       .startListening(false, KeyboardSwitcher.getInstance().getKeyboardView().getWindowToken());
 }