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

Commit ed4af7da authored by Colin Cross's avatar Colin Cross Committed by android-build-merger
Browse files

Merge "Fix weak vtable warnings" am: d93a40c9 am: 11a2bcad am: cd77a5a2

am: 97514a25

Change-Id: Id5af70ceadd584f0dae7aa4d9bb4811ad822cf28
parents cf8cbe1a 97514a25
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -91,12 +91,24 @@ public:
                                        Parcel* reply,
                                        uint32_t flags = 0) = 0;

    // DeathRecipient is pure abstract, there is no virtual method
    // implementation to put in a translation unit in order to silence the
    // weak vtables warning.
    #if defined(__clang__)
    #pragma clang diagnostic push
    #pragma clang diagnostic ignored "-Wweak-vtables"
    #endif

    class DeathRecipient : public virtual RefBase
    {
    public:
        virtual void binderDied(const wp<IBinder>& who) = 0;
    };

    #if defined(__clang__)
    #pragma clang diagnostic pop
    #endif

    /**
     * Register the @a recipient for a notification if this binder
     * goes away.  If this binder object unexpectedly goes away
+11 −0
Original line number Diff line number Diff line
@@ -474,6 +474,11 @@ private:
        bool mMutable;
    };

    #if defined(__clang__)
    #pragma clang diagnostic push
    #pragma clang diagnostic ignored "-Wweak-vtables"
    #endif

    class FlattenableHelperInterface {
    protected:
        ~FlattenableHelperInterface() { }
@@ -484,12 +489,18 @@ private:
        virtual status_t unflatten(void const* buffer, size_t size, int const* fds, size_t count) = 0;
    };

    #if defined(__clang__)
    #pragma clang diagnostic pop
    #endif

    template<typename T>
    class FlattenableHelper : public FlattenableHelperInterface {
        friend class Parcel;
        const Flattenable<T>& val;
        explicit FlattenableHelper(const Flattenable<T>& _val) : val(_val) { }

    protected:
        ~FlattenableHelper() = default;
    public:
        virtual size_t getFlattenedSize() const {
            return val.getFlattenedSize();
+9 −0
Original line number Diff line number Diff line
@@ -26,6 +26,11 @@ namespace android {

class Parcel;

#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wweak-vtables"
#endif

// Abstract interface of all parcelables.
class Parcelable {
public:
@@ -46,6 +51,10 @@ public:
    virtual status_t readFromParcel(const Parcel* parcel) = 0;
};  // class Parcelable

#if defined(__clang__)
#pragma clang diagnostic pop
#endif

}  // namespace android

#endif // ANDROID_PARCELABLE_H
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ class BufferItem;
class ConsumerListener : public virtual RefBase {
public:
    ConsumerListener() { }
    virtual ~ConsumerListener() { }
    virtual ~ConsumerListener();

    // onFrameAvailable is called from queueBuffer each time an additional
    // frame becomes available for consumption. This means that frames that
+2 −1
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ class ProducerListener : public virtual RefBase
{
public:
    ProducerListener() {}
    virtual ~ProducerListener() {}
    virtual ~ProducerListener();

    // onBufferReleased is called from IGraphicBufferConsumer::releaseBuffer to
    // notify the producer that a new buffer is free and ready to be dequeued.
@@ -59,6 +59,7 @@ public:
class DummyProducerListener : public BnProducerListener
{
public:
    virtual ~DummyProducerListener();
    virtual void onBufferReleased() {}
};

Loading