@Override public void onDestroy() { storeConfig(); cleanupSocket(); if (keyStoreManager != null) { keyStoreManager.store(); } super.onDestroy(); }
private void addRecentlyConnected(RemoteDevice remoteDevice) { recentlyConnected.remove(remoteDevice.getAddress()); recentlyConnected.put(remoteDevice.getAddress(), remoteDevice); storeConfig(); }