From 838de0622c700345fbfde270c065fdc97f4b9428 Mon Sep 17 00:00:00 2001 From: Ady Abraham Date: Mon, 4 Feb 2019 10:24:03 -0800 Subject: 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 --- libs/gui/SurfaceComposerClient.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libs/gui/SurfaceComposerClient.cpp') diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index 8c2538ca19..55a2ae5905 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -1382,6 +1382,12 @@ status_t SurfaceComposerClient::setActiveConfig(const sp& display, int return ComposerService::getComposerService()->setActiveConfig(display, id); } +status_t SurfaceComposerClient::setAllowedDisplayConfigs( + const sp& displayToken, const std::vector& allowedConfigs) { + return ComposerService::getComposerService()->setAllowedDisplayConfigs(displayToken, + allowedConfigs); +} + status_t SurfaceComposerClient::getDisplayColorModes(const sp& display, Vector* outColorModes) { return ComposerService::getComposerService()->getDisplayColorModes(display, outColorModes); -- cgit v1.2.3-59-g8ed1b