Merge "Fence didn't manager sync_wait error codes properly" into jb-mr1-dev
diff --git a/include/gui/SurfaceComposerClient.h b/include/gui/SurfaceComposerClient.h
index bae3886..581ec8d 100644
--- a/include/gui/SurfaceComposerClient.h
+++ b/include/gui/SurfaceComposerClient.h
@@ -67,6 +67,12 @@
// Get information about a display
static status_t getDisplayInfo(const sp<IBinder>& display, DisplayInfo* info);
+ /* triggers screen off and waits for it to complete */
+ static void blankDisplay(const sp<IBinder>& display);
+
+ /* triggers screen on and waits for it to complete */
+ static void unblankDisplay(const sp<IBinder>& display);
+
// ------------------------------------------------------------------------
// surface creation / destruction
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 4165d01..3efd086 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -552,6 +552,14 @@
return ComposerService::getComposerService()->getDisplayInfo(display, info);
}
+void SurfaceComposerClient::blankDisplay(const sp<IBinder>& token) {
+ ComposerService::getComposerService()->blank(token);
+}
+
+void SurfaceComposerClient::unblankDisplay(const sp<IBinder>& token) {
+ ComposerService::getComposerService()->unblank(token);
+}
+
// ----------------------------------------------------------------------------
ScreenshotClient::ScreenshotClient()