Enable changing display configuration
This allows querying and switching display device configurations
through the ISurfaceComposer/SurfaceComposerClient interface.
Bug: 14320401
Change-Id: I8c22165698950e5da32204c1c4da92122f91a715
diff --git a/include/gui/ISurfaceComposer.h b/include/gui/ISurfaceComposer.h
index efde5db..8042211 100644
--- a/include/gui/ISurfaceComposer.h
+++ b/include/gui/ISurfaceComposer.h
@@ -113,9 +113,18 @@
*/
virtual void unblank(const sp<IBinder>& display) = 0;
- /* returns information about a display
+ /* returns information for each configuration of the given display
* intended to be used to get information about built-in displays */
- virtual status_t getDisplayInfo(const sp<IBinder>& display, DisplayInfo* info) = 0;
+ virtual status_t getDisplayConfigs(const sp<IBinder>& display,
+ Vector<DisplayInfo>* configs) = 0;
+
+ /* indicates which of the configurations returned by getDisplayInfo is
+ * currently active */
+ virtual int getActiveConfig(const sp<IBinder>& display) = 0;
+
+ /* specifies which configuration (of those returned by getDisplayInfo)
+ * should be used */
+ virtual status_t setActiveConfig(const sp<IBinder>& display, int id) = 0;
/* Capture the specified screen. requires READ_FRAME_BUFFER permission
* This function will fail if there is a secure window on screen.
@@ -158,7 +167,9 @@
AUTHENTICATE_SURFACE,
BLANK,
UNBLANK,
- GET_DISPLAY_INFO,
+ GET_DISPLAY_CONFIGS,
+ GET_ACTIVE_CONFIG,
+ SET_ACTIVE_CONFIG,
CONNECT_DISPLAY,
CAPTURE_SCREEN,
CLEAR_ANIMATION_FRAME_STATS,