EXTRA_RESTORE_BOND

val EXTRA_RESTORE_BOND: String = "no.nordicsemi.android.dfu.extra.EXTRA_RESTORE_BOND"

If the new firmware (application) does not share the bond information with the old one, the bond information is lost. Set this flag to true to make the service create new bond with the new application when the upload is done (and remove the old one). When set to false (default), the DFU service assumes that the LTK is shared between them. Note: currently it is not possible to remove the old bond without creating a new one so if your old application supported bonding while the new one does not you have to modify the source code yourself.

In case of updating the soft device the application is always removed together with the bond information.

Search for occurrences of EXTRA_RESTORE_BOND in this file to check the implementation and get more details.

This flag is ignored when Secure DFU Buttonless Service is used. It will keep or will not restore the bond depending on the Buttonless service type.