Make setActiveConfig() private, remove plumbing
This is to address leftover code review feedback from ag/9714241. We no
longer use setActiveConfig() except for a call from an internal debug
command, so make it private, and remove the plumbing to support calling
it from other processes.
Bug: 142507213
Test: atest libsurfaceflinger_unittest
Test: atest libgui_test
Test: atest SurfaceFlinger_test
Test: atest sffakehwc_test
Change-Id: I84c55f238b93b40b87219e0d584f1ab270bc3eda
diff --git a/services/surfaceflinger/tests/Credentials_test.cpp b/services/surfaceflinger/tests/Credentials_test.cpp
index b1bb7fd..11eecba 100644
--- a/services/surfaceflinger/tests/Credentials_test.cpp
+++ b/services/surfaceflinger/tests/Credentials_test.cpp
@@ -215,10 +215,17 @@
ASSERT_NO_FATAL_FAILURE(checkWithPrivileges<status_t>(condition, NO_ERROR, NO_ERROR));
}
-TEST_F(CredentialsTest, SetActiveConfigTest) {
+TEST_F(CredentialsTest, SetDesiredDisplayConfigsTest) {
const auto display = SurfaceComposerClient::getInternalDisplayToken();
+ int32_t defaultConfig;
+ float minFps;
+ float maxFps;
+ status_t res = SurfaceComposerClient::getDesiredDisplayConfigSpecs(display, &defaultConfig,
+ &minFps, &maxFps);
+ ASSERT_EQ(res, NO_ERROR);
std::function<status_t()> condition = [=]() {
- return SurfaceComposerClient::setActiveConfig(display, 0);
+ return SurfaceComposerClient::setDesiredDisplayConfigSpecs(display, defaultConfig, minFps,
+ maxFps);
};
ASSERT_NO_FATAL_FAILURE(checkWithPrivileges<status_t>(condition, NO_ERROR, PERMISSION_DENIED));
}