@Override protected void onStop() { super.onStop(); if (controllerService != null) unbindService(connection); RobotLog.cancelWriteLogcatToDisk(this); }