DFU v0.6 does not require forcing refreshing services after jump dfu-app when paired

This commit is contained in:
Aleksander Nowakowski 2015-02-18 16:29:00 +01:00
parent 09d7096571
commit fb52ea02be
3 changed files with 10 additions and 7 deletions

View File

@ -3,7 +3,7 @@ apply plugin: 'com.android.library'
ext {
PUBLISH_GROUP_ID = 'no.nordicsemi.android'
PUBLISH_ARTIFACT_ID = 'dfu-library'
PUBLISH_VERSION = '0.5.0'
PUBLISH_VERSION = '0.6.0'
}
android {
@ -13,8 +13,8 @@ android {
defaultConfig {
minSdkVersion 18
targetSdkVersion 21
versionCode 1
versionName "0.5"
versionCode 2
versionName "0.6"
}
buildTypes {
release {

View File

@ -1,7 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="no.nordicsemi.android.dfu"
android:versionCode="1"
android:versionName="0.5" >
android:versionCode="2"
android:versionName="0.6" >
<uses-sdk
android:minSdkVersion="18"

View File

@ -1564,7 +1564,10 @@ public abstract class DfuBaseService extends IntentService {
waitUntilDisconnected();
sendLogBroadcast(LOG_LEVEL_INFO, "Disconnected by the remote device");
refreshDeviceCache(gatt, true); // The new application may have lost bonding information (if there was bonding). Force refresh it just to be sure.
// In the DFU version 0.5, in case the device is bonded, the target device does not send the Service Changed indication after
// a jump from bootloader mode to app mode. This issue has been fixed in DFU version 0.6 (SDK 8.0). We do not need to enforce
// refreshing services since now.
refreshDeviceCache(gatt, version == 5);
// Close the device
close(gatt);
@ -1791,7 +1794,7 @@ public abstract class DfuBaseService extends IntentService {
}
// Close the device
refreshDeviceCache(gatt, false);
refreshDeviceCache(gatt, false); // This should be true when DFU Version is 0.5
close(gatt);
updateProgressNotification(error);
}