@Override public void onServiceDisconnected(ComponentName name) { try { mLoggerService.stopLogger(); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } mLoggerService = null; }
private void stopLogger() { if (mLoggerService != null) { try { mLoggerService.stopLogger(); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } mLoggerServiceConnection.onServiceDisconnected(null); unbindService(mLoggerServiceConnection); } }