-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate SyncserviceJob to work manager
- Loading branch information
Showing
6 changed files
with
45 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
#Mon May 30 16:27:42 EAT 2022 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip | ||
distributionPath=wrapper/dists | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip | ||
org.gradle.configureondemand=true | ||
org.gradle.daemon=true | ||
org.gradle.jvmargs=-Xmx2048m | ||
org.gradle.parallel=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
org.gradle.configureondemand=true | ||
org.gradle.jvmargs=-Xmx2048m | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module com.sun.tools.javac.code { | ||
requires jdk.compiler; | ||
|
||
opens com.sun.tools.javac.code to unnamed; | ||
} |
25 changes: 25 additions & 0 deletions
25
opensrp-core/src/main/java/org/smartregister/job/SyncSettingsServiceWorker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.smartregister.job; | ||
|
||
import android.content.Context; | ||
import android.content.Intent; | ||
|
||
import androidx.annotation.NonNull; | ||
import androidx.work.Worker; | ||
import androidx.work.WorkerParameters; | ||
|
||
import org.smartregister.sync.intent.SettingsSyncIntentService; | ||
|
||
// replaces SyncSettingsServiceJob | ||
public class SyncSettingsServiceWorker extends Worker { | ||
public SyncSettingsServiceWorker(@NonNull Context context, @NonNull WorkerParameters workerParams) { | ||
super(context, workerParams); | ||
} | ||
|
||
@NonNull | ||
@Override | ||
public Result doWork() { | ||
Intent intent = new Intent(getApplicationContext(), SettingsSyncIntentService.class); | ||
getApplicationContext().startService(intent); | ||
return Result.success(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters