Skip to content

Commit fe3eacd

Browse files
minor fix
1 parent 7c68625 commit fe3eacd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,10 @@ protected void onHandleIntent(final Intent intent) {
941941
}
942942
UuidHelper.assignCustomUuids(intent);
943943

944+
if (foregroundService) {
945+
startForeground();
946+
}
947+
944948
mDeviceAddress = deviceAddress;
945949
mDeviceName = deviceName;
946950
mDisableNotification = disableNotification;
@@ -960,9 +964,6 @@ protected void onHandleIntent(final Intent intent) {
960964
mbrSize = DfuSettingsConstants.SETTINGS_DEFAULT_MBR_SIZE;
961965
}
962966

963-
if (foregroundService) {
964-
startForeground();
965-
}
966967
sendLogBroadcast(LOG_LEVEL_VERBOSE, "DFU service started");
967968

968969
/*

0 commit comments

Comments
 (0)