From 5502fb1edf54b63dfa16651153e69b4356ab5604 Mon Sep 17 00:00:00 2001 From: Peter Kalauskas Date: Wed, 10 May 2023 14:06:08 -0700 Subject: [PATCH] Fix trace counter for display refresh rate Fix display_set_preferred_refresh_rate trace counter. Previously, the trace counter did not always reflect the actual value it was set to. Test: perfetto trace, transition to aod, look for display trace counter Bug: 280460655 Change-Id: Iff055ff73ebc28cc980d1dbb51b8c1d266a48cba --- .../systemui/shade/NotificationShadeWindowControllerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java index 46f12105e0326..0c800d456f3ca 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java @@ -333,7 +333,7 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW mLpChanged.preferredMinDisplayRefreshRate = 0; } Trace.setCounter("display_set_preferred_refresh_rate", - (long) mKeyguardPreferredRefreshRate); + (long) mLpChanged.preferredMaxDisplayRefreshRate); } else if (mKeyguardMaxRefreshRate > 0) { boolean bypassOnKeyguard = mKeyguardBypassController.getBypassEnabled() && state.statusBarState == StatusBarState.KEYGUARD