Merge tag '6.4.5'

pull/795/head
Alex Baker 6 years ago
commit 49ad035ab0

@ -19,8 +19,8 @@ android {
defaultConfig {
testApplicationId "org.tasks.test"
applicationId "org.tasks"
versionCode 550
versionName "6.4.3"
versionCode 552
versionName "6.4.5"
targetSdkVersion 28
minSdkVersion 16
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

@ -13,7 +13,14 @@ import org.tasks.notifications.NotificationManager;
public abstract class InjectingService extends Service {
private CompositeDisposable disposables = new CompositeDisposable();
private CompositeDisposable disposables;
@Override
public void onCreate() {
super.onCreate();
startForeground(getNotificationId(), buildNotification());
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
@ -21,11 +28,12 @@ public abstract class InjectingService extends Service {
inject(((InjectingApplication) getApplication()).getComponent().plus(new ServiceModule()));
disposables.add(
Completable.fromAction(this::doWork)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::stopSelf));
disposables =
new CompositeDisposable(
Completable.fromAction(this::doWork)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::stopSelf));
return Service.START_NOT_STICKY;
}

Loading…
Cancel
Save