Skip to content

Commit 23c6074

Browse files
authored
Merge pull request NordicSemiconductor#258 from NordicSemiconductor/bugfix/bonding
Comments regarding bond restoration
2 parents ca25963 + 4c20229 commit 23c6074

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

dfu/src/main/java/no/nordicsemi/android/dfu/DfuServiceInitiator.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,18 @@ public DfuServiceInitiator setForeground(final boolean foreground) {
152152

153153
/**
154154
* Sets whether the bond information should be preserver after flashing new application.
155-
* This feature requires DFU Bootloader version 0.6 or newer (SDK 8.0.0+).
155+
* This feature requires Legacy DFU Bootloader version 0.6 or newer (SDK 8.0.0+).
156156
* Please see the {@link DfuBaseService#EXTRA_KEEP_BOND} for more information regarding
157-
* requirements. Remember that currently updating the Soft Device will remove the bond
158-
* information.
157+
* requirements.
159158
* <p>
160159
* This flag is ignored when Secure DFU Buttonless Service is used. It will keep or remove the
161160
* bond depending on the Buttonless service type.
161+
* <p>
162+
* <b>Important:</b> The flag does not ensure that the DFU is performed on an encrypted link.
163+
* If the bond information is present only on Android side, but not on the peripheral side,
164+
* Android (version 4.3-10) will connect without encryption. On those versions it is not possible
165+
* to ensure the link is truly encrypted, as {@link BluetoothDevice#getBondState()} returns
166+
* {@link BluetoothDevice#BOND_BONDED} also if bonding isn't used.
162167
*
163168
* @param keepBond whether the bond information should be preserved in the new application.
164169
* @return the builder
@@ -169,7 +174,8 @@ public DfuServiceInitiator setKeepBond(final boolean keepBond) {
169174
}
170175

171176
/**
172-
* Sets whether the bond should be created after the DFU is complete.
177+
* Sets whether a new bond should be created after the DFU is complete. The old bond
178+
* information will be removed before.
173179
* Please see the {@link DfuBaseService#EXTRA_RESTORE_BOND} for more information regarding
174180
* requirements.
175181
* <p>

0 commit comments

Comments
 (0)