diff --git a/dfu/build.gradle b/dfu/build.gradle index bcf3efd..3fa46b3 100644 --- a/dfu/build.gradle +++ b/dfu/build.gradle @@ -41,7 +41,7 @@ ext { android { compileSdkVersion 24 - buildToolsVersion '24.0.0' + buildToolsVersion '24.0.2' defaultConfig { minSdkVersion 18 @@ -59,7 +59,7 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:support-v4:24.0.0' + compile 'com.android.support:support-v4:24.2.0' compile 'com.google.code.gson:gson:2.5' } /* diff --git a/dfu/src/main/java/no/nordicsemi/android/dfu/DfuBaseService.java b/dfu/src/main/java/no/nordicsemi/android/dfu/DfuBaseService.java index 00e477b..2a0f1db 100644 --- a/dfu/src/main/java/no/nordicsemi/android/dfu/DfuBaseService.java +++ b/dfu/src/main/java/no/nordicsemi/android/dfu/DfuBaseService.java @@ -908,6 +908,12 @@ public abstract class DfuBaseService extends IntentService implements DfuProgres report(ERROR_BLUETOOTH_DISABLED); return; } + if (mConnectionState == STATE_DISCONNECTED) { + loge("Device got disconnected before service discovery finished"); + sendLogBroadcast(LOG_LEVEL_INFO, "Disconnected"); + terminateConnection(gatt, ERROR_DEVICE_DISCONNECTED); + return; + } if (mError > 0) { // error occurred if ((mError & ERROR_CONNECTION_STATE_MASK) > 0) { final int error = mError & ~ERROR_CONNECTION_STATE_MASK; diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1d6f329..7ecf6f2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Jun 30 16:41:24 CEST 2016 +#Thu Aug 18 10:00:25 CEST 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip