Skip to content

Commit

Permalink
Upgraded WorkManager with API incompatible changes, see #539
Browse files Browse the repository at this point in the history
  • Loading branch information
vRallev committed Oct 21, 2018
1 parent 37406d2 commit 6e770e6
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.3.0-alpha08 (2018-10-20)
* Upgraded WorkManager with API incompatible changes, see #539

## 1.3.0-alpha07 (2018-09-23)
* Handle crash when rescheduling jobs, see #510
* Upgraded WorkManager
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ext {

supportLibVersion = '28.0.0'
playServicesVersion = '15.0.1'
workVersion = '1.0.0-alpha09'
workVersion = '1.0.0-alpha10'
stethoVersion = '1.5.0'
junitVersion = '4.12'
assertjVersion = '3.6.2'
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#VERSION_NAME=1.3.0-alpha07
#VERSION_NAME=1.3.0-alpha08
VERSION_NAME=1.3.0-SNAPSHOT
VERSION_CODE=1
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ public void runJob(String tag) {
}

public List<WorkStatus> getWorkStatus(String tag) {
return WorkManager.getInstance().synchronous().getStatusesByTagSync(tag);
try {
return WorkManager.getInstance().getStatusesByTag(tag).get();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ private List<WorkStatus> getWorkStatusBlocking(String tag) {
return Collections.emptyList();
}

return workManager.synchronous().getStatusesByTagSync(tag);
try {
return workManager.getStatusesByTag(tag).get(5, TimeUnit.SECONDS);
} catch (Exception e) {
return Collections.emptyList();
}
}
}

0 comments on commit 6e770e6

Please sign in to comment.