private void resetConnection() { Log.d(MetaWatch.TAG, "MetaWatchService.resetConnection()"); wakeLock.acquire(5000); try { if (connectionState != ConnectionState.DISCONNECTING) { connectionState = ConnectionState.CONNECTING; disconnect(); } } finally { if (wakeLock != null && wakeLock.isHeld()) { wakeLock.release(); } } }
void disconnectExit() { connectionState = ConnectionState.DISCONNECTING; updateNotification(); disconnect(); }