Issue #56 fixed
This commit is contained in:
parent
0799eb051b
commit
c2e0e5fec9
|
@ -57,6 +57,7 @@ public class DfuServiceInitiator {
|
||||||
private int fileType = -1;
|
private int fileType = -1;
|
||||||
|
|
||||||
private boolean keepBond;
|
private boolean keepBond;
|
||||||
|
private boolean restoreBond;
|
||||||
private boolean forceDfu = false;
|
private boolean forceDfu = false;
|
||||||
private boolean enableUnsafeExperimentalButtonlessDfu = false;
|
private boolean enableUnsafeExperimentalButtonlessDfu = false;
|
||||||
|
|
||||||
|
@ -111,6 +112,17 @@ public class DfuServiceInitiator {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets whether the bond should be created after the DFU is complete.
|
||||||
|
* Please see the {@link DfuBaseService#EXTRA_RESTORE_BOND} for more information regarding requirements.
|
||||||
|
* @param restoreBond whether the bond should be created after the DFU is complete.
|
||||||
|
* @return the builder
|
||||||
|
*/
|
||||||
|
public DfuServiceInitiator setRestoreBond(final boolean restoreBond) {
|
||||||
|
this.restoreBond = restoreBond;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables or disables the Packet Receipt Notification (PRN) procedure.
|
* Enables or disables the Packet Receipt Notification (PRN) procedure.
|
||||||
* <p>By default the PRNs are disabled on devices with Android Marshmallow or newer and enabled on older ones.</p>
|
* <p>By default the PRNs are disabled on devices with Android Marshmallow or newer and enabled on older ones.</p>
|
||||||
|
@ -461,6 +473,7 @@ public class DfuServiceInitiator {
|
||||||
intent.putExtra(DfuBaseService.EXTRA_INIT_FILE_PATH, initFilePath);
|
intent.putExtra(DfuBaseService.EXTRA_INIT_FILE_PATH, initFilePath);
|
||||||
intent.putExtra(DfuBaseService.EXTRA_INIT_FILE_RES_ID, initFileResId);
|
intent.putExtra(DfuBaseService.EXTRA_INIT_FILE_RES_ID, initFileResId);
|
||||||
intent.putExtra(DfuBaseService.EXTRA_KEEP_BOND, keepBond);
|
intent.putExtra(DfuBaseService.EXTRA_KEEP_BOND, keepBond);
|
||||||
|
intent.putExtra(DfuBaseService.EXTRA_RESTORE_BOND, restoreBond);
|
||||||
intent.putExtra(DfuBaseService.EXTRA_FORCE_DFU, forceDfu);
|
intent.putExtra(DfuBaseService.EXTRA_FORCE_DFU, forceDfu);
|
||||||
intent.putExtra(DfuBaseService.EXTRA_UNSAFE_EXPERIMENTAL_BUTTONLESS_DFU, enableUnsafeExperimentalButtonlessDfu);
|
intent.putExtra(DfuBaseService.EXTRA_UNSAFE_EXPERIMENTAL_BUTTONLESS_DFU, enableUnsafeExperimentalButtonlessDfu);
|
||||||
if (packetReceiptNotificationsEnabled != null) {
|
if (packetReceiptNotificationsEnabled != null) {
|
||||||
|
|
Loading…
Reference in New Issue