Merge "Push empty sync transaction before taking screenshot in tests" into nyc-dev
am: 08588dd760
* commit '08588dd76073a8635aa4175d5b98fc5db86afec4':
Push empty sync transaction before taking screenshot in tests
Change-Id: Iad404364ca17d6a23ceca928d342d3931b2418f2
diff --git a/services/surfaceflinger/tests/Transaction_test.cpp b/services/surfaceflinger/tests/Transaction_test.cpp
index 320fddb..f8d4d13 100644
--- a/services/surfaceflinger/tests/Transaction_test.cpp
+++ b/services/surfaceflinger/tests/Transaction_test.cpp
@@ -66,6 +66,8 @@
sp<ISurfaceComposer> sf(ComposerService::getComposerService());
sp<IBinder> display(sf->getBuiltInDisplay(
ISurfaceComposer::eDisplayIdMain));
+ SurfaceComposerClient::openGlobalTransaction();
+ SurfaceComposerClient::closeGlobalTransaction(true);
ASSERT_EQ(NO_ERROR, sf->captureScreen(display, producer, Rect(), 0, 0,
0, INT_MAX, false));
*sc = new ScreenCapture(cpuConsumer);