From 027d1537474f4f4e9b8f8847df253954eabe98fe Mon Sep 17 00:00:00 2001 From: Sylvia van Os Date: Sun, 28 Jan 2024 12:41:52 +0100 Subject: [PATCH] Don't version-guard the background colour fix All Android versions seem to need this for the main screen --- app/src/main/java/protect/card_locker/Utils.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/protect/card_locker/Utils.java b/app/src/main/java/protect/card_locker/Utils.java index 22a7c2c18..802a620cb 100644 --- a/app/src/main/java/protect/card_locker/Utils.java +++ b/app/src/main/java/protect/card_locker/Utils.java @@ -666,13 +666,10 @@ public class Utils { } } - // XXX android 9 and below has issues with patched theme where the background becomes a - // rendering mess - // use after views are inflated + // Force correct color + // Fixes OLED dark mode in MainActivity public static void postPatchColors(AppCompatActivity activity) { - if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.P) { - activity.findViewById(android.R.id.content).setBackgroundColor(resolveBackgroundColor(activity)); - } + activity.findViewById(android.R.id.content).setBackgroundColor(resolveBackgroundColor(activity)); } // Either pass an Activity on which to call getWindow() or an existing Window (may be null) returned by that function.