Update to SDK 29 (Android 10) (#2468)

This commit is contained in:
arkon
2020-01-09 20:31:27 -05:00
committed by GitHub
parent f7669b6797
commit 83d5e458ca
12 changed files with 34 additions and 24 deletions

View File

@@ -189,7 +189,7 @@ class BackupRestoreService : Service() {
return Observable.just(Unit)
.map {
val reader = JsonReader(contentResolver.openInputStream(uri).bufferedReader())
val reader = JsonReader(contentResolver.openInputStream(uri)!!.bufferedReader())
val json = JsonParser().parse(reader).asJsonObject
// Get parser version

View File

@@ -22,7 +22,7 @@ class LibraryUpdateJob : Job() {
val preferences = Injekt.get<PreferencesHelper>()
val interval = prefInterval ?: preferences.libraryUpdateInterval().getOrDefault()
if (interval > 0) {
val restrictions = preferences.libraryUpdateRestriction()
val restrictions = preferences.libraryUpdateRestriction()!!
val acRestriction = "ac" in restrictions
val wifiRestriction = if ("wifi" in restrictions)
JobRequest.NetworkType.UNMETERED
@@ -44,4 +44,4 @@ class LibraryUpdateJob : Job() {
JobManager.instance().cancelAllForTag(TAG)
}
}
}
}