SurfaceFlinger: handle wallpaper scenario in Scheduler
Use the fact that a layer contains wallpaper in Scheduler's
algorithm when picking a refresh rate. Wallpaper should be presented
in the lowest active refresh rate to preserve power.
Test: systrace during wallpaper
Bug: 124065567
Change-Id: Ibb18e62eaf1a6b9b3ab1ec18a3135fb17c8f57fc
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 7c88cd8..9f32ff7 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -4030,7 +4030,7 @@
if (metadata.has(METADATA_WINDOW_TYPE)) {
int32_t windowType = metadata.getInt32(METADATA_WINDOW_TYPE, 0);
if (windowType == 441731) {
- metadata.setInt32(METADATA_WINDOW_TYPE, 2024); // TYPE_NAVIGATION_BAR_PANEL
+ metadata.setInt32(METADATA_WINDOW_TYPE, InputWindowInfo::TYPE_NAVIGATION_BAR_PANEL);
primaryDisplayOnly = true;
}
}