@Override public void onServiceDisconnected(ComponentName arg0) { if (service != null) { try { service.stopLoopbackTest(); } catch (RemoteException e) { Log.e(THIS_FILE, "Error in test", e); } } service = null; }
@Override protected void onPause() { super.onPause(); if (service != null) { try { service.stopLoopbackTest(); } catch (RemoteException e) { Log.e(THIS_FILE, "Error in test", e); } } if (connection != null) { unbindService(connection); } if (monitorThread != null) { monitorThread.markFinished(); monitorThread = null; } }