/**
  * Initiatize a new session.
  *
  * @param args The arguments that were supplied to {@link VoiceInteractionService#startSession
  *     VoiceInteractionService.startSession}.
  */
 public void onCreate(Bundle args) {
   mTheme =
       mTheme != 0
           ? mTheme
           : com.android.internal.R.style.Theme_DeviceDefault_VoiceInteractionSession;
   mInflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
   mWindow =
       new SoftInputWindow(
           mContext,
           "VoiceInteractionSession",
           mTheme,
           mCallbacks,
           this,
           mDispatcherState,
           WindowManager.LayoutParams.TYPE_VOICE_INTERACTION,
           Gravity.TOP,
           true);
   mWindow.getWindow().addFlags(WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
   initViews();
   mWindow.getWindow().setLayout(MATCH_PARENT, WRAP_CONTENT);
   mWindow.setToken(mToken);
 }