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

Commit 592a9fde authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "audio: Add IAudioManager method" into main

parents f2082570 c54c3645
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@
namespace android {

// ----------------------------------------------------------------------------

// TODO(b/309532236) replace this class with AIDL generated parcelable
class IAudioManager : public IInterface
{
public:
@@ -43,6 +43,7 @@ public:
        RELEASE_RECORDER                      = IBinder::FIRST_CALL_TRANSACTION + 6,
        PLAYER_SESSION_ID                     = IBinder::FIRST_CALL_TRANSACTION + 7,
        PORT_EVENT                            = IBinder::FIRST_CALL_TRANSACTION + 8,
        PERMISSION_UPDATE_BARRIER             = IBinder::FIRST_CALL_TRANSACTION + 9,
    };

    DECLARE_META_INTERFACE(AudioManager)
@@ -63,6 +64,7 @@ public:
    /*oneway*/ virtual status_t playerSessionId(audio_unique_id_t piid, audio_session_t sessionId) = 0;
    /*oneway*/ virtual status_t portEvent(audio_port_handle_t portId, player_state_t event,
                const std::unique_ptr<os::PersistableBundle>& extras) = 0;
    virtual status_t permissionUpdateBarrier() = 0;
};

// ----------------------------------------------------------------------------
+6 −0
Original line number Diff line number Diff line
@@ -152,6 +152,12 @@ public:
        data.writeNullableParcelable(extras);
        return remote()->transact(PORT_EVENT, data, &reply, IBinder::FLAG_ONEWAY);
    }

    virtual status_t permissionUpdateBarrier() {
        Parcel data, reply;
        data.writeInterfaceToken(IAudioManager::getInterfaceDescriptor());
        return remote()->transact(PERMISSION_UPDATE_BARRIER, data, &reply, 0);
    }
};

IMPLEMENT_META_INTERFACE(AudioManager, "android.media.IAudioService");