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

Commit f733831f authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "Declare IAudioTrack methods in binder opcode order"

parents ca61ea84 798ef8e8
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -35,6 +35,9 @@ class IAudioTrack : public IInterface
public: 
    DECLARE_META_INTERFACE(AudioTrack);

    /* Get this track's control block */
    virtual sp<IMemory> getCblk() const = 0;

    /* After it's created the track is not active. Call start() to
     * make it active. If set, the callback will start being called.
     */
@@ -67,8 +70,6 @@ public:
     */
    virtual status_t    attachAuxEffect(int effectId) = 0;

    /* get this track's control block */
    virtual sp<IMemory> getCblk() const = 0;    
};

// ----------------------------------------------------------------------------
+12 −12
Original line number Diff line number Diff line
@@ -46,6 +46,18 @@ public:
    {
    }
    
    virtual sp<IMemory> getCblk() const
    {
        Parcel data, reply;
        sp<IMemory> cblk;
        data.writeInterfaceToken(IAudioTrack::getInterfaceDescriptor());
        status_t status = remote()->transact(GET_CBLK, data, &reply);
        if (status == NO_ERROR) {
            cblk = interface_cast<IMemory>(reply.readStrongBinder());
        }
        return cblk;
    }

    virtual status_t start()
    {
        Parcel data, reply;
@@ -88,18 +100,6 @@ public:
        remote()->transact(PAUSE, data, &reply);
    }
    
    virtual sp<IMemory> getCblk() const
    {
        Parcel data, reply;
        sp<IMemory> cblk;
        data.writeInterfaceToken(IAudioTrack::getInterfaceDescriptor());
        status_t status = remote()->transact(GET_CBLK, data, &reply);
        if (status == NO_ERROR) {
            cblk = interface_cast<IMemory>(reply.readStrongBinder());
        }
        return cblk;
    }

    virtual status_t attachAuxEffect(int effectId)
    {
        Parcel data, reply;