From dc419524c5ec8703bb222462c423926b708f7a91 Mon Sep 17 00:00:00 2001 From: Robin Vinterbladh Date: Tue, 3 Sep 2024 12:29:54 +0200 Subject: [PATCH] Add MaterialComponents.DayNight to SearchBarStyle When opening the Settings app or changing colors in ThemePicker there are tons of warnings with UnsupportedOperationException in the log. These logs are related to the LayoutInflater attempting to inflate a MaterialCardView and TypedArray#getColor where it expects the colors to be either an integer color or a color state list. This happens every time you re-start Settings. To enable layout inflater finding colors for Settings we add a MaterialComponents theme to SearchBarStyle, this makes sure that TypedArray#getColor gets an integer color instead of relying on framework to solve this. Flag: NA Bug: 363970601 Test: manual, open Settings and check the logs Change-Id: I728c1537537bb4d32af6006800de93e64facfa8e --- res/values/styles.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/res/values/styles.xml b/res/values/styles.xml index 0bd04061d35..deebb7f893b 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -455,11 +455,13 @@