SurfaceFlinger: add setAllowedDisplayConfigs
Add an API to ISurfaceComposer to set allowed display configurations.
This API is expected to be called by DisplayManager depends on the
current policy in place. Once setAllowedDisplayConfigs is called,
SF can only set a new display config if it is part of the allowed
configurations list.
Test: call setAllowedDisplayConfigs() from backdoor and
observe config change.
Bug: 122905403
Change-Id: I1d0a3649bbe7a08efeb72dc270f0b2df330b021c
diff --git a/libs/gui/tests/Surface_test.cpp b/libs/gui/tests/Surface_test.cpp
index f127853..dae7736 100644
--- a/libs/gui/tests/Surface_test.cpp
+++ b/libs/gui/tests/Surface_test.cpp
@@ -678,6 +678,10 @@
const sp<IRegionSamplingListener>& /*listener*/) override {
return NO_ERROR;
}
+ status_t setAllowedDisplayConfigs(const sp<IBinder>& /*displayToken*/,
+ const std::vector<int32_t>& /*allowedConfigs*/) override {
+ return NO_ERROR;
+ }
protected:
IBinder* onAsBinder() override { return nullptr; }