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

Commit 161f47e0 authored by Atneya Nair's avatar Atneya Nair
Browse files

Inherit RefBase virtually in AudioDeviceCallback

In cases where we have diamond inheritance from RefBase, such as
implementing two different callback interfaces, we need to share
the reference count. Two seperate reference counts lead to
difficult to detect lifetime issues.

Bug: 207034551
Test: Compiles
Change-Id: I4c6e0bca2fdf65eaed5029b3ec8a7b6a39b3f15f
parent 4ba4f224
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -594,7 +594,7 @@ public:
    static status_t addAudioPortCallback(const sp<AudioPortCallback>& callback);
    static status_t removeAudioPortCallback(const sp<AudioPortCallback>& callback);

    class AudioDeviceCallback : public RefBase
    class AudioDeviceCallback : public virtual RefBase
    {
    public: