Beispiel #1
0
 @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;
 }
Beispiel #2
0
  @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;
    }
  }