From 67c5302e0b489c7a96af88452d54e829bdb55553 Mon Sep 17 00:00:00 2001 From: Naveen Date: Wed, 28 Feb 2024 13:12:17 +0530 Subject: [PATCH] Fix slideshow on Android 14 Closes https://github.com/FossifyOrg/Gallery/issues/35 Original PR: https://github.com/FossifyOrg/Gallery/pull/12#issuecomment-1898242638 --- .../org/fossify/gallery/activities/ViewPagerActivity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/org/fossify/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/org/fossify/gallery/activities/ViewPagerActivity.kt index 550f79590..7810f0c73 100644 --- a/app/src/main/kotlin/org/fossify/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/org/fossify/gallery/activities/ViewPagerActivity.kt @@ -406,7 +406,9 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View } window.decorView.setOnSystemUiVisibilityChangeListener { visibility -> - mIsFullScreen = if (isNougatPlus() && isInMultiWindowMode) { + mIsFullScreen = if (isUpsideDownCakePlus()) { + visibility and View.SYSTEM_UI_FLAG_LOW_PROFILE != 0 + } else if (isNougatPlus() && isInMultiWindowMode) { visibility and View.SYSTEM_UI_FLAG_LOW_PROFILE != 0 } else if (visibility and View.SYSTEM_UI_FLAG_LOW_PROFILE == 0) { false