From 85ed7a74577ff1bdf24a56ccdced5076e6aadb94 Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 1 Aug 2020 12:10:28 -0400 Subject: [PATCH] Fix for reader crash in < Android 9 --- .../java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index 52c7479954..a30aebc9d3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -658,9 +658,11 @@ class ReaderActivity : BaseRxActivity() .onEach { setTrueColor(it) } .launchIn(scope) - preferences.cutoutShort().asFlow() - .onEach { setCutoutShort(it) } - .launchIn(scope) + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { + preferences.cutoutShort().asFlow() + .onEach { setCutoutShort(it) } + .launchIn(scope) + } preferences.keepScreenOn().asFlow() .onEach { setKeepScreenOn(it) }