Logging improved
This commit is contained in:
parent
2a3eac37c5
commit
c8abe84a82
|
@ -839,8 +839,8 @@ public abstract class DfuBaseService extends IntentService implements DfuProgres
|
||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
|
|
||||||
Log.i(TAG, "DFU version: " + BuildConfig.VERSION_NAME);
|
|
||||||
DEBUG = isDebug();
|
DEBUG = isDebug();
|
||||||
|
logi("DFU service created. Version: " + BuildConfig.VERSION_NAME);
|
||||||
initialize();
|
initialize();
|
||||||
|
|
||||||
final LocalBroadcastManager manager = LocalBroadcastManager.getInstance(this);
|
final LocalBroadcastManager manager = LocalBroadcastManager.getInstance(this);
|
||||||
|
@ -932,6 +932,10 @@ public abstract class DfuBaseService extends IntentService implements DfuProgres
|
||||||
// This would eventually crash later...
|
// This would eventually crash later...
|
||||||
throw new NullPointerException("getNotificationTarget() must not return null if notifications are enabled");
|
throw new NullPointerException("getNotificationTarget() must not return null if notifications are enabled");
|
||||||
}
|
}
|
||||||
|
if (!foregroundService && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
logw("Foreground service disabled. Android Oreo or newer may kill a background service few moments after user closes the application.\n" +
|
||||||
|
"Consider enabling foreground service using DfuServiceInitiator#setForeground(boolean)");
|
||||||
|
}
|
||||||
UuidHelper.assignCustomUuids(intent);
|
UuidHelper.assignCustomUuids(intent);
|
||||||
|
|
||||||
mDeviceAddress = deviceAddress;
|
mDeviceAddress = deviceAddress;
|
||||||
|
|
Loading…
Reference in New Issue