diff options
author | Wink Saville <wink@google.com> | 2012-08-28 16:20:50 -0700 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2012-08-28 16:20:50 -0700 |
commit | 9b5782baf0a8a2d7afc7129453beb5df7abe7650 (patch) | |
tree | 0330952a7225ad4b42a32fa049a22faccc3ad549 | |
parent | 55801e41e6d7306d75d8134dd69d7d8cbbfbc63c (diff) | |
download | frameworks_native-9b5782baf0a8a2d7afc7129453beb5df7abe7650.zip frameworks_native-9b5782baf0a8a2d7afc7129453beb5df7abe7650.tar.gz frameworks_native-9b5782baf0a8a2d7afc7129453beb5df7abe7650.tar.bz2 |
A vendor ril depends on a native screen shot code.
Add a temporary shim until the vendor fixes the ril.
Bug: 7073467
Change-Id: Ia95a58bd90677c03406c988d1c29ae785f8662f2
-rw-r--r-- | include/gui/SurfaceComposerClient.h | 5 | ||||
-rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/gui/SurfaceComposerClient.h b/include/gui/SurfaceComposerClient.h index a143d81..73214a4 100644 --- a/include/gui/SurfaceComposerClient.h +++ b/include/gui/SurfaceComposerClient.h @@ -148,6 +148,11 @@ class ScreenshotClient public: ScreenshotClient(); + // TODO: Remove me. Do not use. + // This is a compatibility shim for one product whose drivers are depending on + // this legacy function (when they shouldn't). + status_t update(); + // frees the previous screenshot and capture a new one status_t update(const sp<IBinder>& display); status_t update(const sp<IBinder>& display, diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index e4922a4..0ffa932 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -558,6 +558,14 @@ ScreenshotClient::ScreenshotClient() : mWidth(0), mHeight(0), mFormat(PIXEL_FORMAT_NONE) { } +// TODO: Remove me. Do not use. +// This is a compatibility shim for one product whose drivers are depending on +// this legacy function (when they shouldn't). +status_t ScreenshotClient::update() { + sp<ISurfaceComposer> sm(ComposerService::getComposerService()); + return update(sm->getBuiltInDisplay(0)); +} + status_t ScreenshotClient::update(const sp<IBinder>& display) { sp<ISurfaceComposer> s(ComposerService::getComposerService()); if (s == NULL) return NO_INIT; |