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

Commit b6888fab authored by Peiyong Lin's avatar Peiyong Lin
Browse files

Fix getProtectedContentSupport API.

BUG: 117436546
Test: Build, flash and boot. Check returned value from SurfaceControl.
Change-Id: I119be9e409b51e5055048bbc8fe28b4626cbbeeb
parent 1e602c3e
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -687,13 +687,13 @@ public:
    virtual status_t getProtectedContentSupport(bool* outSupported) const {
        Parcel data, reply;
        data.writeInterfaceToken(ISurfaceComposer::getInterfaceDescriptor());
        status_t error =
                remote()->transact(BnSurfaceComposer::GET_PROTECTED_CONTENT_SUPPORT, data, &reply);
        bool result;
        status_t err = reply.readBool(&result);
        if (err == NO_ERROR) {
            *outSupported = result;
        if (error != NO_ERROR) {
            return error;
        }
        return err;
        error = reply.readBool(outSupported);
        return error;
    }

    virtual status_t cacheBuffer(const sp<IBinder>& token, const sp<GraphicBuffer>& buffer,
@@ -1187,7 +1187,6 @@ status_t BnSurfaceComposer::onTransact(
            CHECK_INTERFACE(ISurfaceComposer, data, reply);
            bool result;
            status_t error = getProtectedContentSupport(&result);
            reply->writeInt32(error);
            if (error == NO_ERROR) {
                reply->writeBool(result);
            }