SF: Populate allowGroupSwitching from DM
Currently we use allowGroupSwitching only for testing. This CL
populates its value from DisplayManager so we can use user
setting to change its value.
Bug: 161776333
Test: atest libsurfaceflinger_unittest
Change-Id: I851eaee7f86083d97204cf3553e728350c942dfe
diff --git a/services/surfaceflinger/tests/Credentials_test.cpp b/services/surfaceflinger/tests/Credentials_test.cpp
index 7f541e2..9302463 100644
--- a/services/surfaceflinger/tests/Credentials_test.cpp
+++ b/services/surfaceflinger/tests/Credentials_test.cpp
@@ -218,18 +218,21 @@
TEST_F(CredentialsTest, SetDesiredDisplayConfigsTest) {
const auto display = SurfaceComposerClient::getInternalDisplayToken();
int32_t defaultConfig;
+ bool allowGroupSwitching;
float primaryFpsMin;
float primaryFpsMax;
float appRequestFpsMin;
float appRequestFpsMax;
status_t res =
SurfaceComposerClient::getDesiredDisplayConfigSpecs(display, &defaultConfig,
+ &allowGroupSwitching,
&primaryFpsMin, &primaryFpsMax,
&appRequestFpsMin,
&appRequestFpsMax);
ASSERT_EQ(res, NO_ERROR);
std::function<status_t()> condition = [=]() {
return SurfaceComposerClient::setDesiredDisplayConfigSpecs(display, defaultConfig,
+ allowGroupSwitching,
primaryFpsMin, primaryFpsMax,
appRequestFpsMin,
appRequestFpsMax);