Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d026a1e1 authored by Wink Saville's avatar Wink Saville Committed by The Android Automerger
Browse files

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
parent 0b19a4f4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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,
+8 −0
Original line number Diff line number Diff line
@@ -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;