diff options
author | Allan Wang <me@allanwang.ca> | 2019-08-15 22:13:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-15 22:13:37 -0700 |
commit | 3cc5ca08fde58688810a53e83c1e866980c49ada (patch) | |
tree | 56444cfe379a491e14db26608dd7c4572aedad55 /app/src/main/kotlin/com/pitchedapps/frost/services/FrostRequestService.kt | |
parent | d500d1dd6e05c6128dcb15fe8e15acb2aaf979cd (diff) | |
parent | 39d07d946b753f197d200fa07792670e37435a95 (diff) | |
download | frost-3cc5ca08fde58688810a53e83c1e866980c49ada.tar.gz frost-3cc5ca08fde58688810a53e83c1e866980c49ada.tar.bz2 frost-3cc5ca08fde58688810a53e83c1e866980c49ada.zip |
Merge pull request #1505 from AllanWang/native-toggle
Native toggle
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/services/FrostRequestService.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/services/FrostRequestService.kt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostRequestService.kt b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostRequestService.kt index 0d707dae..fe59c421 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/services/FrostRequestService.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/services/FrostRequestService.kt @@ -31,6 +31,7 @@ import com.pitchedapps.frost.utils.EnumBundle import com.pitchedapps.frost.utils.EnumBundleCompanion import com.pitchedapps.frost.utils.EnumCompanion import com.pitchedapps.frost.utils.L +import com.pitchedapps.frost.utils.Prefs import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch @@ -162,13 +163,17 @@ class FrostRequestService : BaseJobService() { override fun onStartJob(params: JobParameters?): Boolean { super.onStartJob(params) + if (Prefs.webOnly) { + L.i { "Web only; skipping request service" } + return false + } val bundle = params?.extras if (bundle == null) { L.eThrow("Launched ${this::class.java.simpleName} without param data") return false } val cookie = bundle.getCookie() - if (cookie.isNullOrBlank()) { + if (cookie.isBlank()) { L.eThrow("Launched ${this::class.java.simpleName} without cookie") return false } |