moving whole new photo fetcher handling on a background thread
This commit is contained in:
parent
b1b173081a
commit
9c7c995251
1 changed files with 38 additions and 39 deletions
|
@ -56,7 +56,7 @@ class NewPhotoFetcher : JobService() {
|
||||||
|
|
||||||
override fun onStartJob(params: JobParameters): Boolean {
|
override fun onStartJob(params: JobParameters): Boolean {
|
||||||
mRunningParams = params
|
mRunningParams = params
|
||||||
|
ensureBackgroundThread {
|
||||||
val affectedFolderPaths = HashSet<String>()
|
val affectedFolderPaths = HashSet<String>()
|
||||||
if (params.triggeredContentAuthorities != null && params.triggeredContentUris != null) {
|
if (params.triggeredContentAuthorities != null && params.triggeredContentUris != null) {
|
||||||
val ids = arrayListOf<String>()
|
val ids = arrayListOf<String>()
|
||||||
|
@ -95,7 +95,6 @@ class NewPhotoFetcher : JobService() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ensureBackgroundThread {
|
|
||||||
affectedFolderPaths.forEach {
|
affectedFolderPaths.forEach {
|
||||||
updateDirectoryPath(it)
|
updateDirectoryPath(it)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue