title: Android: Starting SpeechRecognizer as service throws Service com.xxx.xxx.MyService has leaked ServiceConnection
body: <p>I'm developing an Android app which uses SpeechRecognizer as a service and keeps listening indefinitely (this is configurable) and I'm facing two problems regarding this so I hope anyone here is able to give some help.</p>
  
  <p>The first problem is after the activity which uses SpeechRecognizer starts the next error is thrown in LogCat (I copy and paste full LogCat too):</p>
  
  <pre><code>    E/ActivityThread(7865): Service com.xxx.xxx.MyService has leaked ServiceConnection android.speech.SpeechRecognizer$Connection@85f41fe that was originally bound here
  </code></pre>
  
  <p>And the LogCat:</p>
  
  <pre><code>    07-19 12:09:46.460: E/lightsbindercall(2268): virtual void android::BpLEDManager::restart() : Binder Transaction Start!!
      07-19 12:09:46.461: E/lightsbindercall(2268): virtual void android::BpLEDManager::restart() : Binder Transaction End!! (error code 0)
      07-19 12:09:46.486: E/lge_audio_pcm_dump(337): lge_set_dump_config: exit dump_config : 0
      07-19 12:09:46.486: E/bt_a2dp_hw(337): adev_set_parameters: ERROR: set param called even when stream out is null
      07-19 12:09:46.488: E/native(2268): do suspend false
      07-19 12:09:48.389: E/ActivityThread(7865): Service com.testMe.testMe.MyService has leaked ServiceConnection android.speech.SpeechRecognizer$Connection@85f41fe that was originally bound here
      07-19 12:09:48.389: E/ActivityThread(7865): android.app.ServiceConnectionLeaked: Service com.testMe.testMe.MyService has leaked ServiceConnection android.speech.SpeechRecognizer$Connection@85f41fe that was originally bound here
      07-19 12:09:48.389: E/ActivityThread(7865):     at android.app.LoadedApk$ServiceDispatcher.&lt;init&gt;(LoadedApk.java:1136)
      07-19 12:09:48.389: E/ActivityThread(7865):     at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:1030)
      07-19 12:09:48.389: E/ActivityThread(7865):     at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1305)
      07-19 12:09:48.389: E/ActivityThread(7865):     at android.app.ContextImpl.bindService(ContextImpl.java:1288)
      07-19 12:09:48.389: E/ActivityThread(7865):     at android.content.ContextWrapper.bindService(ContextWrapper.java:604)
      07-19 12:09:48.389: E/ActivityThread(7865):     at android.speech.SpeechRecognizer.startListening(SpeechRecognizer.java:288)
      07-19 12:09:48.389: E/ActivityThread(7865):     at com.testMe.testMe.MyService$IncomingHandler.handleMessage(MyService.java:75)
      07-19 12:09:48.389: E/ActivityThread(7865):     at android.os.Handler.dispatchMessage(Handler.java:102)
      07-19 12:09:48.389: E/ActivityThread(7865):     at android.os.Looper.loop(Looper.java:148)
      07-19 12:09:48.389: E/ActivityThread(7865):     at android.app.ActivityThread.main(ActivityThread.java:5551)
      07-19 12:09:48.389: E/ActivityThread(7865):     at java.lang.reflect.Method.invoke(Native Method)
      07-19 12:09:48.389: E/ActivityThread(7865):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
      07-19 12:09:48.389: E/ActivityThread(7865):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
      07-19 12:09:48.604: E/AudioRecord-JNI(20863): Error -4 during AudioRecord native read
      07-19 12:09:48.676: E/audio_hw_primary(337): select_devices: enter and usecase(1)
      07-19 12:09:48.676: E/audio_hw_primary(337): enable_snd_device: enter  2
      07-19 12:09:49.498: E/NetlinkEvent(332): Failed to open ra_info_flag (No such file or directory)
      07-19 12:09:49.803: E/NetlinkEvent(332): Failed to open ra_info_flag (No such file or directory)
      07-19 12:09:49.803: E/NetlinkEvent(332): Failed to open ra_info_flag (No such file or directory)
      07-19 12:09:49.803: E/NetlinkEvent(332): Failed to open ra_info_flag (No such file or directory)
      07-19 12:09:49.868: E/WifiConfigStore(2268): saveWifiConfigBSSID Setting BSSID for "vodafone4E1C"-WPA_PSK to any
      07-19 12:09:49.879: E/WifiConfigStore(2268): saveWifiConfigBSSID Setting BSSID for "vodafone4E1C"-WPA_PSK to any
      07-19 12:09:49.900: E/WifiStateMachine(2268): Start Dhcp Watchdog 375
      07-19 12:09:49.903: E/NetlinkEvent(332): NetlinkEvent::FindParam(): Parameter 'UID' not found
      07-19 12:09:49.908: E/native(2268): do suspend false
      07-19 12:09:49.909: E/WifiStateMachine(2268): CheckDhcpInfoCacheList : DhcpStateMachine.CMD_PRE_DHCP_ACTION[ConnectingState]
      07-19 12:09:49.917: E/LocSvc_LBSApiV02(2268): E/virtual int lbs_core::LBSApiV02::wifiAttachmentStatusInject(const WifiSupplicantInfo&amp;):660]: Error : st = 11, ind.status = -1228261996
      07-19 12:09:49.988: E/NetlinkEvent(332): NetlinkEvent::FindParam(): Parameter 'UID' not found
      07-19 12:09:50.010: E/ConnectivityService(2268): Unexpected mtu value: 0, wlan0
      07-19 12:09:50.010: E/Netd(332): [LGE_DATA] modifyIpRoute wlan0
      07-19 12:09:50.011: E/Netd(332): [LGE_DATA] modifyIpRoute wlan0
      07-19 12:09:50.012: E/Netd(332): [LGE_DATA] modifyIpRoute wlan0
      07-19 12:09:50.099: E/AlarmManager(2268): Exist canceled pending intent
      07-19 12:09:50.099: E/AlarmManager(2268): Cancel 1 alarm(s) in package com.google.android.googlequicksearchbox
      07-19 12:09:50.228: E/LocSvc_libulp(2268): E/int ulp_brain_transition_all_providers(), no QUIPC/GNSS transition logic run due to both engines are OFF 
      07-19 12:09:50.323: E/ConnectivityService(2268): BUG: NetworkAgentInfo [WIFI () - 578] already has NetworkRequest [ id=1, legacyType=-1, [ Capabilities: INTERNET&amp;NOT_RESTRICTED&amp;TRUSTED&amp;NOT_VPN] ]
      07-19 12:09:50.364: E/SetupWizard(4915): tickleCheckinService called after completing user setup
      07-19 12:09:50.565: E/WeatherPlatformReceiver(20168): Application  have permission so update all cities
      07-19 12:09:50.569: E/LGDMClient(4878): [DmNotiService.java] [onCreate()] : [154] : DmNotiService.onCreate()
      07-19 12:09:51.065: E/ConnectivityService(2268): put valid  true
      07-19 12:09:51.198: E/WeatherPlatformReceiver(20168): Application  have permission so update all cities
      07-19 12:09:51.213: E/LGDMClient(4878): [DmNotiService.java] [onCreate()] : [154] : DmNotiService.onCreate()
      07-19 12:09:51.617: E/Exception(3283): SmackException: Client is already logged in
      07-19 12:09:52.048: E/ConnectivityService(2268): put valid  true
      07-19 12:09:52.357: E/audio_hw_primary(337): disable_snd_device: enter 2
      07-19 12:09:52.386: E/art(2993): invalid stream - problem with parameter iterator in /data/app/com.facebook.orca-2/base.apk:classes2.dex for method void com.facebook.fbservice.service.r.d(com.facebook.fbservice.service.r)
  </code></pre>
  
  <p>MyService.java (this is SpeechRecognizer service):</p>
  
  <pre><code>import java.lang.ref.WeakReference;
  import java.util.ArrayList;
  
  import android.app.Service;
  import android.content.Intent;
  import android.media.AudioManager;
  import android.os.Build;
  import android.os.Bundle;
  import android.os.CountDownTimer;
  import android.os.Handler;
  import android.os.IBinder;
  import android.os.Message;
  import android.os.Messenger;
  import android.os.RemoteException;
  import android.os.ResultReceiver;
  import android.speech.RecognitionListener;
  import android.speech.RecognizerIntent;
  import android.speech.SpeechRecognizer;
  import android.util.Log;
  
  public class MyService extends Service {
  
      //protected static AudioManager mAudioManager; 
      protected SpeechRecognizer mSpeechRecognizer;
      protected Intent mSpeechRecognizerIntent;
      protected final Messenger mServerMessenger = new Messenger(new IncomingHandler(this));
  
      protected boolean mIsListening;
      protected volatile boolean mIsCountDownOn;
      private static boolean mIsStreamSolo;
  
      static final int MSG_RECOGNIZER_START_LISTENING = 1;
      static final int MSG_RECOGNIZER_CANCEL = 2;
  
      ResultReceiver resultReceiver;
  
      @Override
      public void onCreate() {
          super.onCreate();
          //mAudioManager = (AudioManager) getSystemService(this.AUDIO_SERVICE); 
          mSpeechRecognizer = SpeechRecognizer.createSpeechRecognizer(this);
          mSpeechRecognizer.setRecognitionListener(new SpeechRecognitionListener());
          mSpeechRecognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
          mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
          mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, this.getPackageName());
          //mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_PARTIAL_RESULTS, true);
          //mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS, 3000L);
      }
  
      protected class IncomingHandler extends Handler {
          private WeakReference&lt;MyService&gt; mtarget;
  
          IncomingHandler(MyService target) {
              mtarget = new WeakReference&lt;MyService&gt;(target);
          }
  
          @Override
          public void handleMessage(Message msg) {
  
              final MyService target = mtarget.get();
  
              switch (msg.what) {
                  case MSG_RECOGNIZER_START_LISTENING:
  
                      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.JELLY_BEAN) {
                          // turn off beep sound  
                          if (!mIsStreamSolo) {
                              mIsStreamSolo = true;
                          }
                      }
                      if (!target.mIsListening) {
                          if (SpeechRecognizer.isRecognitionAvailable(getApplicationContext())){
                              target.mSpeechRecognizer.startListening(target.mSpeechRecognizerIntent);
                              sendReceiver("startListening");
  
                              target.mIsListening = true;
                              //Log.d(TAG, "message start listening"); //$NON-NLS-1$
  
                              new CountDownTimer(2000, 1000) {
  
                                  public void onTick(long millisUntilFinished) {
                                      //do nothing, just let it tick
                                  }
  
                                  public void onFinish() {
                                      target.mSpeechRecognizer.stopListening();
                                      sendReceiver("stopListening");
                                  }
                              }.start();
                          }
                      }
                      break;
                   case MSG_RECOGNIZER_CANCEL:
  
                       if (mIsStreamSolo) {
                           //mAudioManager.setStreamSolo(AudioManager.STREAM_VOICE_CALL, false);
                           mIsStreamSolo = false;
                       }
                       target.mSpeechRecognizer.cancel();
                       target.mIsListening = false;
                       //Log.d(TAG, "message canceled recognizer"); //$NON-NLS-1$
                       break;
              }
          } 
      }
  
      private void sendReceiver(String strMessage){
  
          Bundle bundle = new Bundle();
          bundle.putString("speechResult", String.valueOf(strMessage));
          resultReceiver.send(100, bundle);
      }
  
      // Count down timer for Jelly Bean work around
      protected CountDownTimer mNoSpeechCountDown = new CountDownTimer(2000, 1000) {
  
          @Override
          public void onTick(long millisUntilFinished) {
              // TODO Auto-generated method stub
          }
  
          @Override
          public void onFinish() {
  
              startOver();
          }
      };
  
      private void startOver() {
          mIsCountDownOn = false;
          Message message = Message.obtain(null, MSG_RECOGNIZER_CANCEL);
          try {
              mServerMessenger.send(message);
              message = Message.obtain(null, MSG_RECOGNIZER_START_LISTENING);
              mServerMessenger.send(message);
          } catch (RemoteException e) {
  
          }
      }
  
      @Override
      public int onStartCommand (Intent intent, int flags, int startId) {
  
          resultReceiver = intent.getParcelableExtra("receiver");
  
          try {
              Message msg = new Message();
              msg.what = MSG_RECOGNIZER_START_LISTENING; 
              mServerMessenger.send(msg);
          } catch (RemoteException e) {
  
          }
          return  START_NOT_STICKY;
      }
  
      @Override
      public void onDestroy() {
          super.onDestroy();
  
          if (mIsCountDownOn) {
              mNoSpeechCountDown.cancel();
          }
          if (mSpeechRecognizer != null) {
              mSpeechRecognizer.stopListening();
              mSpeechRecognizer.cancel();
              mSpeechRecognizer.destroy();
          }
      }
  
      protected class SpeechRecognitionListener implements RecognitionListener {
  
          private static final String TAG = "abc";
  
          @Override
          public void onBeginningOfSpeech() {
              // speech input will be processed, so there is no need for count down anymore
              if (mIsCountDownOn) {
                  mIsCountDownOn = false;
                  mNoSpeechCountDown.cancel();
              }               
              //Log.d(TAG, "onBeginingOfSpeech"); //$NON-NLS-1$
          }
  
          @Override
          public void onBufferReceived(byte[] buffer) {
  
          }
  
          @Override
          public void onEndOfSpeech() {
              //Log.d(TAG, "onEndOfSpeech"); //$NON-NLS-1$
          }
  
          @Override
          public void onError(int error) {
              if (mIsCountDownOn) {
                  mIsCountDownOn = false;
                  mNoSpeechCountDown.cancel();
              }
              mIsListening = false;
              Message message = Message.obtain(null, MSG_RECOGNIZER_START_LISTENING);
              try {
                  mServerMessenger.send(message);
              } catch (RemoteException e) {
              }
              //Log.d(TAG, "error = " + error); //$NON-NLS-1$
          }
  
          @Override
          public void onEvent(int eventType, Bundle params) {
  
          }
  
          @Override
          public void onPartialResults(Bundle partialResults) {
  
          }
  
          @Override
          public void onReadyForSpeech(Bundle params) {
              if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.JELLY_BEAN) {
                  mIsCountDownOn = true;
                  mNoSpeechCountDown.start();
              }
              Log.d(TAG, "onReadyForSpeech"); //$NON-NLS-1$
          }
  
          @Override
          public void onResults(Bundle results) {
  
              String str = new String();
              Log.d(TAG, "onResults " + results);
              ArrayList&lt;String&gt; data = results.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);
              for (int i = 0; i &lt; data.size(); i++) {
                  Log.d(TAG, "result " + data.get(i));
                  str += "@@" + data.get(i);
              }
  
              sendReceiver(str);
              startOver();
          }
  
          @Override
          public void onRmsChanged(float rmsdB) {
  
          }
  
      }
  
      @Override
      public IBinder onBind(Intent intent) {
          // TODO Auto-generated method stub
          return null;
      }
  }    
  </code></pre>
  
  <p>Class in main activity where service is called (this is done specifically in a fragment):</p>
  
  <pre><code>        @Override
          public View onCreateView(LayoutInflater inflater, ViewGroup container,
                  Bundle savedInstanceState) {
              ...
  
   startRecognitionService();
              ...
          }
  
          private void startRecognitionService(){
  
              Context context = getActivity().getApplicationContext();
              ((ActivityTest) getActivity()).muteAudio();
              resultReceiver = new MyResultReceiver(null);
              myService = new Intent(context, MyService.class);
              myService.putExtra("receiver", resultReceiver);
              context.startService(myService);
          }
  </code></pre>
  
  <p>subclass in fragment which handles service results:</p>
  
  <pre><code>        class MyResultReceiver extends ResultReceiver {
              public MyResultReceiver(Handler handler) {
                  super(handler);
              }
  
              @Override
              protected void onReceiveResult(int resultCode, Bundle resultData) {
  
  
                  String speechResult = resultData.getString("speechResult");
                  UpdateUI action = new UpdateUI("Result Received: "+speechResult);
                  if (speechResult!=null &amp;&amp; action!=null &amp;&amp; getActivity()!=null){
                      getActivity().runOnUiThread(action);    
                  }
              }
          }
  
          class UpdateUI implements Runnable {
              String updateString;
  
              public UpdateUI(String updateString) {
                  this.updateString = updateString;
              }
              public void run() {             
  
                  if (updateString.contains("startListening") || updateString.contains("stopListening")){
                      Activity activity = getActivity();
                      Context context = activity.getApplicationContext();
  
                      TextView tvQuestionNumber = (TextView) activity.findViewById(R.id.llBody).findViewById(R.id.tvQuestionNumber);
                      int drawablePadding = GeneralUtils.dp2px(5, context);
                      tvQuestionNumber.setCompoundDrawablePadding(drawablePadding);
                      int imgRecord=0;
                      if (updateString.contains("startListening")){
                          imgRecord = context.getResources().getIdentifier("record", "drawable", context.getPackageName());
                      }else{
                          if (updateString.contains("stopListening")){
                              imgRecord = context.getResources().getIdentifier("record_clear", "drawable", context.getPackageName());
                          }
                      }
                      if (imgRecord != 0) {
                          Drawable left = context.getResources().getDrawable(imgRecord);
                          tvQuestionNumber.setCompoundDrawablesWithIntrinsicBounds(left, null, null, null);
                      }
                  }else{
                      String result = String.valueOf(updateString).toLowerCase(); 
                      int nroPage = mViewPager.getCurrentItem();
  
                      if (result.contains("next")||result.contains("siguiente")){
                          mViewPager.setCurrentItem(nroPage+1);   
                      }
                      if (result.contains("previous")||result.contains("anterior")){
                          mViewPager.setCurrentItem(nroPage-1);
                      }
  
                      if (result.contains("einstein")){
                          cbAnswer[4*(pageNumber-1)+0].callOnClick();
                      }else{
                          if (result.contains("copérnico")){
                              cbAnswer[4*(pageNumber-1)+1].callOnClick();
                          }else{
                              if (result.contains("tesla")){
                                  cbAnswer[4*(pageNumber-1)+2].callOnClick();
                              }else{
                                  if (result.contains("newton")){
                                      cbAnswer[4*(pageNumber-1)+3].callOnClick(); 
                                  }
                              }
                          }
                      }
                  }
              }
          }
  </code></pre>
  
  <p>The service just starts ok and listens, but the second problem is after some time stops listening. I have added a little record icon which appears and dissapears so the user knows when app is listening and after some time it stops listenning and the little record icon stops showing (I use a result receiver to communicate service and calling class) like this:</p>
  
  <pre><code>        class MyResultReceiver extends ResultReceiver {
              public MyResultReceiver(Handler handler) {
                  super(handler);
              }
  
              @Override
              protected void onReceiveResult(int resultCode, Bundle resultData) {
  
                  String speechResult = resultData.getString("speechResult");
                  getActivity().runOnUiThread(new UpdateUI("Result Received: "+speechResult));
              }
          }
  
          class UpdateUI implements Runnable {
              String updateString;
  
              public UpdateUI(String updateString) {
                  this.updateString = updateString;
              }
              public void run() {
  
                  String result = String.valueOf(updateString).toLowerCase(); 
                  int nroPage = mViewPager.getCurrentItem();
  
                  if (result.contains("einstein")){
                      cbAnswer[4*(pageNumber-1)+0].callOnClick();
                  }else{
                      if (result.contains("copérnico")){
                          cbAnswer[4*(pageNumber-1)+1].callOnClick();
                      }else{
                          if (result.contains("tesla")){
                              cbAnswer[4*(pageNumber-1)+2].callOnClick();
                          }else{
                              if (result.contains("newton")){
                                  cbAnswer[4*(pageNumber-1)+3].callOnClick(); 
                              }
                          }
                      }
                  }
  
                  if (result.contains("next")||result.contains("siguiente")){
                      mViewPager.setCurrentItem(nroPage+1);   
                  }
                  if (result.contains("previous")||result.contains("anterior")){
                      mViewPager.setCurrentItem(nroPage-1);
                  }
              }
          }
  </code></pre>
  
  <p>OK, I hope given information is enough for someone to give some help, if not let me know and of course many thanks in advance!!</p>
  
  <p>PS.</p>
  
  <p>I add some other part of LogCat where I guess it shows the error or problem related to recognizer stop listening:</p>
  
  <p>07-19 14:11:10.383: E/ACDB-LOADER(337): Error: ACDB AudProc vol returned = -19
  07-19 14:11:10.387: E/AudioRecord-JNI(20863): Error -4 during AudioRecord native read
  07-19 14:11:10.406: E/linker(20863): readlink('/proc/self/fd/48') failed: Permission denied [fd=48]
  07-19 14:11:10.407: E/linker(20863): warning: unable to get realpath for the library "libstagefrighthw.so". Will use given name.
  07-19 14:11:10.455: E/linker(20863): readlink('/proc/self/fd/48') failed: Permission denied [fd=48]
  07-19 14:11:10.455: E/linker(20863): warning: unable to get realpath for the library "libOmxCore.so". Will use given name.
  07-19 14:11:10.476: E/OMXMaster(20863): A component of name 'OMX.qcom.audio.decoder.aac' already exists, ignoring this one.
  07-19 14:11:10.482: E/linker(20863): readlink('/proc/self/fd/48') failed: Permission denied [fd=48]
  07-19 14:11:10.482: E/linker(20863): warning: unable to get realpath for the library "libstagefright_soft_amrwbenc.so". Will use given name.
  07-19 14:11:10.486: E/audio_hw_primary(337): select_devices: enter and usecase(1)
  07-19 14:11:10.486: E/audio_hw_primary(337): select_devices: enter and usecase(7)
  07-19 14:11:10.518: E/audio_hw_primary(337): disable_snd_device: enter 129
  07-19 14:11:10.577: E/ChromiumNetwork(20863): Exception in upload method
  07-19 14:11:10.577: E/ChromiumNetwork(20863): com.google.android.apps.gsa.shared.exception.GsaIOException: Error code: 262182
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.android.apps.gsa.shared.io.am.abort(QueueDataSource.java:108)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.android.apps.gsa.search.core.k.k.abort(EagerDataSource.java:98)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.android.apps.gsa.search.core.k.a.m.a(MonitoredCronetRequest.java:181)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.android.apps.gsa.search.core.k.a.a.close(CronetAsyncConnectionResources.java:1168)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.android.apps.gsa.search.core.k.a.disconnect(AsyncHttpConnection.java:90)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.android.apps.gsa.search.core.k.e$2.onSuccess(AsyncHttpEngine.java:1276)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.common.util.concurrent.aq$2.run(Futures.java:1136)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.common.util.concurrent.bi.execute(MoreExecutors.java:437)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.common.util.concurrent.al.a(ExecutionList.java:143)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.common.util.concurrent.al.b(ExecutionList.java:89)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.common.util.concurrent.bd.addListener(ListenableFutureTask.java:82)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.common.util.concurrent.aq.a(Futures.java:1139)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.common.util.concurrent.aq.a(Futures.java:1077)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.android.apps.gsa.search.core.k.e.disconnect(AsyncHttpEngine.java:271)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.android.apps.gsa.shared.io.h.disconnect(ConnectionWrapper.java:246)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.android.apps.gsa.r.i.Ns(PairHttpConnection.java:394)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.android.apps.gsa.r.g.run(PairHttpConnection.java:299)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at java.util.concurrent.FutureTask.run(FutureTask.java:237)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.android.apps.gsa.shared.util.concurrent.a.af.run(TaskRunnerFutureTask.java:122)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.android.apps.gsa.shared.util.concurrent.a.aq.run(ThrottlingExecutor.java:139)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at java.lang.Thread.run(Thread.java:818)
  07-19 14:11:10.577: E/ChromiumNetwork(20863):   at com.google.android.apps.gsa.shared.util.concurrent.a.aa$1.run(GsaThreadFactory.java:104)
  07-19 14:11:12.348: E/AudioRecord-JNI(20863): Error -4 during AudioRecord native read
  07-19 14:11:12.398: E/audio_hw_primary(337): disable_snd_device: enter 129
  07-19 14:11:12.627: E/audio_hw_primary(337): select_devices: enter and usecase(7)
  07-19 14:11:12.627: E/audio_hw_primary(337): enable_snd_device: enter  129
  07-19 14:11:12.627: E/ACDB-LOADER(337): Error: ACDB AudProc vol returned = -19
  07-19 14:11:12.913: E/linker(20863): readlink('/proc/self/fd/48') failed: Permission denied [fd=48]
  07-19 14:11:12.913: E/linker(20863): warning: unable to get realpath for the library "libstagefright_soft_amrwbenc.so". Will use given name.
  07-19 14:11:14.568: E/AudioRecord-JNI(20863): Error -4 during AudioRecord native read
  07-19 14:11:14.618: E/audio_hw_primary(337): disable_snd_device: enter 129
  07-19 14:11:14.807: E/audio_hw_primary(337): select_devices: enter and usecase(7)
  07-19 14:11:14.807: E/audio_hw_primary(337): enable_snd_device: enter  129
  07-19 14:11:14.808: E/ACDB-LOADER(337): Error: ACDB AudProc vol returned = -19
  07-19 14:11:14.809: E/AudioRecord-JNI(20863): Error -4 during AudioRecord native read</p>