Source:
<code>public void onDestroy() { log.debug(".onDestroy()"); WalletApplication.scheduleStartBlockchainService(this); unregisterReceiver(tickReceiver); application.getWallet().removeChangeEventListener(walletEventListener); application.getWallet().removeCoinsSentEventListener(walletEventListener); application.getWallet().removeCoinsReceivedEventListener(walletEventListener); <START> application.getWallet().getContext().sporkManager.removeEventListener(sporkUpdatedEventListener); <END> unregisterReceiver(connectivityReceiver); if (peerGroup != null) { peerGroup.removeDisconnectedEventListener(peerConnectivityListener); peerGroup.removeConnectedEventListener(peerConnectivityListener); peerGroup.removeWallet(application.getWallet()); peerGroup.stop(); log.info("peergroup stopped"); } peerConnectivityListener.stop(); delayHandler.removeCallbacksAndMessages(null); try { blockStore.close(); } catch (final BlockStoreException x) { throw new RuntimeException(x); } if (!deleteWalletFileOnShutdown) { application.saveWallet(); } if (wakeLock.isHeld()) { log.debug("wakelock still held, releasing"); wakeLock.release(); } if (resetBlockchainOnShutdown || deleteWalletFileOnShutdown) { log.info("removing blockchain"); blockChainFile.delete(); SimplifiedMasternodeListManager manager = application.getWallet().getContext().masternodeListManager; if(manager != null) { manager.resetMNList(true, false); } if (deleteWalletFileOnShutdown) { log.info("removing wallet file and app data"); application.finalizeWipe(); } } if(bootStrapStream != null) { try { bootStrapStream.close(); } catch (IOException x) { } } super.onDestroy(); log.info("service was up for " + ((System.currentTimeMillis() - serviceCreatedAt) / 1000 / 60) + " minutes"); }</code><technical_language>sporks for in app, I removed this code master branch e237a37 (#334)</technical_language>

Target:
public void onDestroy() { log.debug(".onDestroy()"); WalletApplication.scheduleStartBlockchainService(this); unregisterReceiver(tickReceiver); application.getWallet().removeChangeEventListener(walletEventListener); application.getWallet().removeCoinsSentEventListener(walletEventListener); application.getWallet().removeCoinsReceivedEventListener(walletEventListener); unregisterReceiver(connectivityReceiver); if (peerGroup != null) { peerGroup.removeDisconnectedEventListener(peerConnectivityListener); peerGroup.removeConnectedEventListener(peerConnectivityListener); peerGroup.removeWallet(application.getWallet()); peerGroup.stop(); log.info("peergroup stopped"); } peerConnectivityListener.stop(); delayHandler.removeCallbacksAndMessages(null); try { blockStore.close(); } catch (final BlockStoreException x) { throw new RuntimeException(x); } if (!deleteWalletFileOnShutdown) { application.saveWallet(); } if (wakeLock.isHeld()) { log.debug("wakelock still held, releasing"); wakeLock.release(); } if (resetBlockchainOnShutdown || deleteWalletFileOnShutdown) { log.info("removing blockchain"); blockChainFile.delete(); SimplifiedMasternodeListManager manager = application.getWallet().getContext().masternodeListManager; if(manager != null) { manager.resetMNList(true, false); } if (deleteWalletFileOnShutdown) { log.info("removing wallet file and app data"); application.finalizeWipe(); } } if(bootStrapStream != null) { try { bootStrapStream.close(); } catch (IOException x) { } } super.onDestroy(); log.info("service was up for " + ((System.currentTimeMillis() - serviceCreatedAt) / 1000 / 60) + " minutes"); }