From 88f4f2bf96d7dd964d99cacb6a485b74304a19a0 Mon Sep 17 00:00:00 2001 From: Pinyao Ting Date: Fri, 15 Sep 2023 23:54:59 +0000 Subject: [PATCH] Disables local color extraction for widgets As discovered during investigation of system health issues, doing local color extraction in widgets (for the purpose of making their color matches the background during a drag) took many CPU cycle during layout pass, which may have contributed to animation janks in various scenario. This CL removes the feature in favors of better performance. Bug: 266941872 Test: manually verified theme are still honored in widgets. Change-Id: I63b13bc005907779af2322cd4bedbe141b0f3e27 --- src/com/android/launcher3/widget/LauncherAppWidgetHostView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java b/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java index 98d854ed5d..340a61e1c5 100644 --- a/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java +++ b/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java @@ -107,7 +107,7 @@ public class LauncherAppWidgetHostView extends BaseLauncherAppWidgetHostView if (Utilities.ATLEAST_Q && Themes.getAttrBoolean(mLauncher, R.attr.isWorkspaceDarkText)) { setOnLightBackground(true); } - mColorExtractor = LocalColorExtractor.newInstance(getContext()); + mColorExtractor = new LocalColorExtractor(); // no-op } @Override