session

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2026 License: CC0-1.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionISessionSendEvent                       = binder.FirstCallTransaction + 0
	TransactionISessionGetController                   = binder.FirstCallTransaction + 1
	TransactionISessionSetFlags                        = binder.FirstCallTransaction + 2
	TransactionISessionSetActive                       = binder.FirstCallTransaction + 3
	TransactionISessionSetMediaButtonReceiver          = binder.FirstCallTransaction + 4
	TransactionISessionSetMediaButtonBroadcastReceiver = binder.FirstCallTransaction + 5
	TransactionISessionSetLaunchPendingIntent          = binder.FirstCallTransaction + 6
	TransactionISessionDestroySession                  = binder.FirstCallTransaction + 7
	TransactionISessionSetMetadata                     = binder.FirstCallTransaction + 8
	TransactionISessionSetPlaybackState                = binder.FirstCallTransaction + 9
	TransactionISessionResetQueue                      = binder.FirstCallTransaction + 10
	TransactionISessionGetBinderForSetQueue            = binder.FirstCallTransaction + 11
	TransactionISessionSetQueueTitle                   = binder.FirstCallTransaction + 12
	TransactionISessionSetExtras                       = binder.FirstCallTransaction + 13
	TransactionISessionSetRatingType                   = binder.FirstCallTransaction + 14
	TransactionISessionSetPlaybackToLocal              = binder.FirstCallTransaction + 15
	TransactionISessionSetPlaybackToRemote             = binder.FirstCallTransaction + 16
	TransactionISessionSetCurrentVolume                = binder.FirstCallTransaction + 17
)
View Source
const (
	MethodISessionSendEvent                       = "sendEvent"
	MethodISessionGetController                   = "getController"
	MethodISessionSetFlags                        = "setFlags"
	MethodISessionSetActive                       = "setActive"
	MethodISessionSetMediaButtonReceiver          = "setMediaButtonReceiver"
	MethodISessionSetMediaButtonBroadcastReceiver = "setMediaButtonBroadcastReceiver"
	MethodISessionSetLaunchPendingIntent          = "setLaunchPendingIntent"
	MethodISessionDestroySession                  = "destroySession"
	MethodISessionSetMetadata                     = "setMetadata"
	MethodISessionSetPlaybackState                = "setPlaybackState"
	MethodISessionResetQueue                      = "resetQueue"
	MethodISessionGetBinderForSetQueue            = "getBinderForSetQueue"
	MethodISessionSetQueueTitle                   = "setQueueTitle"
	MethodISessionSetExtras                       = "setExtras"
	MethodISessionSetRatingType                   = "setRatingType"
	MethodISessionSetPlaybackToLocal              = "setPlaybackToLocal"
	MethodISessionSetPlaybackToRemote             = "setPlaybackToRemote"
	MethodISessionSetCurrentVolume                = "setCurrentVolume"
)
View Source
const (
	TransactionISessionCallbackOnCommand                   = binder.FirstCallTransaction + 0
	TransactionISessionCallbackOnMediaButton               = binder.FirstCallTransaction + 1
	TransactionISessionCallbackOnMediaButtonFromController = binder.FirstCallTransaction + 2
	TransactionISessionCallbackOnPrepare                   = binder.FirstCallTransaction + 3
	TransactionISessionCallbackOnPrepareFromMediaId        = binder.FirstCallTransaction + 4
	TransactionISessionCallbackOnPrepareFromSearch         = binder.FirstCallTransaction + 5
	TransactionISessionCallbackOnPrepareFromUri            = binder.FirstCallTransaction + 6
	TransactionISessionCallbackOnPlay                      = binder.FirstCallTransaction + 7
	TransactionISessionCallbackOnPlayFromMediaId           = binder.FirstCallTransaction + 8
	TransactionISessionCallbackOnPlayFromSearch            = binder.FirstCallTransaction + 9
	TransactionISessionCallbackOnPlayFromUri               = binder.FirstCallTransaction + 10
	TransactionISessionCallbackOnSkipToTrack               = binder.FirstCallTransaction + 11
	TransactionISessionCallbackOnPause                     = binder.FirstCallTransaction + 12
	TransactionISessionCallbackOnStop                      = binder.FirstCallTransaction + 13
	TransactionISessionCallbackOnNext                      = binder.FirstCallTransaction + 14
	TransactionISessionCallbackOnPrevious                  = binder.FirstCallTransaction + 15
	TransactionISessionCallbackOnFastForward               = binder.FirstCallTransaction + 16
	TransactionISessionCallbackOnRewind                    = binder.FirstCallTransaction + 17
	TransactionISessionCallbackOnSeekTo                    = binder.FirstCallTransaction + 18
	TransactionISessionCallbackOnRate                      = binder.FirstCallTransaction + 19
	TransactionISessionCallbackOnSetPlaybackSpeed          = binder.FirstCallTransaction + 20
	TransactionISessionCallbackOnCustomAction              = binder.FirstCallTransaction + 21
	TransactionISessionCallbackOnAdjustVolume              = binder.FirstCallTransaction + 22
	TransactionISessionCallbackOnSetVolumeTo               = binder.FirstCallTransaction + 23
)
View Source
const (
	MethodISessionCallbackOnCommand                   = "onCommand"
	MethodISessionCallbackOnMediaButton               = "onMediaButton"
	MethodISessionCallbackOnMediaButtonFromController = "onMediaButtonFromController"
	MethodISessionCallbackOnPrepare                   = "onPrepare"
	MethodISessionCallbackOnPrepareFromMediaId        = "onPrepareFromMediaId"
	MethodISessionCallbackOnPrepareFromSearch         = "onPrepareFromSearch"
	MethodISessionCallbackOnPrepareFromUri            = "onPrepareFromUri"
	MethodISessionCallbackOnPlay                      = "onPlay"
	MethodISessionCallbackOnPlayFromMediaId           = "onPlayFromMediaId"
	MethodISessionCallbackOnPlayFromSearch            = "onPlayFromSearch"
	MethodISessionCallbackOnPlayFromUri               = "onPlayFromUri"
	MethodISessionCallbackOnSkipToTrack               = "onSkipToTrack"
	MethodISessionCallbackOnPause                     = "onPause"
	MethodISessionCallbackOnStop                      = "onStop"
	MethodISessionCallbackOnNext                      = "onNext"
	MethodISessionCallbackOnPrevious                  = "onPrevious"
	MethodISessionCallbackOnFastForward               = "onFastForward"
	MethodISessionCallbackOnRewind                    = "onRewind"
	MethodISessionCallbackOnSeekTo                    = "onSeekTo"
	MethodISessionCallbackOnRate                      = "onRate"
	MethodISessionCallbackOnSetPlaybackSpeed          = "onSetPlaybackSpeed"
	MethodISessionCallbackOnCustomAction              = "onCustomAction"
	MethodISessionCallbackOnAdjustVolume              = "onAdjustVolume"
	MethodISessionCallbackOnSetVolumeTo               = "onSetVolumeTo"
)
View Source
const (
	TransactionISessionControllerSendCommand            = binder.FirstCallTransaction + 0
	TransactionISessionControllerSendMediaButton        = binder.FirstCallTransaction + 1
	TransactionISessionControllerRegisterCallback       = binder.FirstCallTransaction + 2
	TransactionISessionControllerUnregisterCallback     = binder.FirstCallTransaction + 3
	TransactionISessionControllerGetPackageName         = binder.FirstCallTransaction + 4
	TransactionISessionControllerGetTag                 = binder.FirstCallTransaction + 5
	TransactionISessionControllerGetSessionInfo         = binder.FirstCallTransaction + 6
	TransactionISessionControllerGetLaunchPendingIntent = binder.FirstCallTransaction + 7
	TransactionISessionControllerGetFlags               = binder.FirstCallTransaction + 8
	TransactionISessionControllerGetVolumeAttributes    = binder.FirstCallTransaction + 9
	TransactionISessionControllerAdjustVolume           = binder.FirstCallTransaction + 10
	TransactionISessionControllerSetVolumeTo            = binder.FirstCallTransaction + 11
	TransactionISessionControllerPrepare                = binder.FirstCallTransaction + 12
	TransactionISessionControllerPrepareFromMediaId     = binder.FirstCallTransaction + 13
	TransactionISessionControllerPrepareFromSearch      = binder.FirstCallTransaction + 14
	TransactionISessionControllerPrepareFromUri         = binder.FirstCallTransaction + 15
	TransactionISessionControllerPlay                   = binder.FirstCallTransaction + 16
	TransactionISessionControllerPlayFromMediaId        = binder.FirstCallTransaction + 17
	TransactionISessionControllerPlayFromSearch         = binder.FirstCallTransaction + 18
	TransactionISessionControllerPlayFromUri            = binder.FirstCallTransaction + 19
	TransactionISessionControllerSkipToQueueItem        = binder.FirstCallTransaction + 20
	TransactionISessionControllerPause                  = binder.FirstCallTransaction + 21
	TransactionISessionControllerStop                   = binder.FirstCallTransaction + 22
	TransactionISessionControllerNext                   = binder.FirstCallTransaction + 23
	TransactionISessionControllerPrevious               = binder.FirstCallTransaction + 24
	TransactionISessionControllerFastForward            = binder.FirstCallTransaction + 25
	TransactionISessionControllerRewind                 = binder.FirstCallTransaction + 26
	TransactionISessionControllerSeekTo                 = binder.FirstCallTransaction + 27
	TransactionISessionControllerRate                   = binder.FirstCallTransaction + 28
	TransactionISessionControllerSetPlaybackSpeed       = binder.FirstCallTransaction + 29
	TransactionISessionControllerSendCustomAction       = binder.FirstCallTransaction + 30
	TransactionISessionControllerGetMetadata            = binder.FirstCallTransaction + 31
	TransactionISessionControllerGetPlaybackState       = binder.FirstCallTransaction + 32
	TransactionISessionControllerGetQueue               = binder.FirstCallTransaction + 33
	TransactionISessionControllerGetQueueTitle          = binder.FirstCallTransaction + 34
	TransactionISessionControllerGetExtras              = binder.FirstCallTransaction + 35
	TransactionISessionControllerGetRatingType          = binder.FirstCallTransaction + 36
)
View Source
const (
	MethodISessionControllerSendCommand            = "sendCommand"
	MethodISessionControllerSendMediaButton        = "sendMediaButton"
	MethodISessionControllerRegisterCallback       = "registerCallback"
	MethodISessionControllerUnregisterCallback     = "unregisterCallback"
	MethodISessionControllerGetPackageName         = "getPackageName"
	MethodISessionControllerGetTag                 = "getTag"
	MethodISessionControllerGetSessionInfo         = "getSessionInfo"
	MethodISessionControllerGetLaunchPendingIntent = "getLaunchPendingIntent"
	MethodISessionControllerGetFlags               = "getFlags"
	MethodISessionControllerGetVolumeAttributes    = "getVolumeAttributes"
	MethodISessionControllerAdjustVolume           = "adjustVolume"
	MethodISessionControllerSetVolumeTo            = "setVolumeTo"
	MethodISessionControllerPrepare                = "prepare"
	MethodISessionControllerPrepareFromMediaId     = "prepareFromMediaId"
	MethodISessionControllerPrepareFromSearch      = "prepareFromSearch"
	MethodISessionControllerPrepareFromUri         = "prepareFromUri"
	MethodISessionControllerPlay                   = "play"
	MethodISessionControllerPlayFromMediaId        = "playFromMediaId"
	MethodISessionControllerPlayFromSearch         = "playFromSearch"
	MethodISessionControllerPlayFromUri            = "playFromUri"
	MethodISessionControllerSkipToQueueItem        = "skipToQueueItem"
	MethodISessionControllerPause                  = "pause"
	MethodISessionControllerStop                   = "stop"
	MethodISessionControllerNext                   = "next"
	MethodISessionControllerPrevious               = "previous"
	MethodISessionControllerFastForward            = "fastForward"
	MethodISessionControllerRewind                 = "rewind"
	MethodISessionControllerSeekTo                 = "seekTo"
	MethodISessionControllerRate                   = "rate"
	MethodISessionControllerSetPlaybackSpeed       = "setPlaybackSpeed"
	MethodISessionControllerSendCustomAction       = "sendCustomAction"
	MethodISessionControllerGetMetadata            = "getMetadata"
	MethodISessionControllerGetPlaybackState       = "getPlaybackState"
	MethodISessionControllerGetQueue               = "getQueue"
	MethodISessionControllerGetQueueTitle          = "getQueueTitle"
	MethodISessionControllerGetExtras              = "getExtras"
	MethodISessionControllerGetRatingType          = "getRatingType"
)
View Source
const (
	TransactionISessionControllerCallbackOnEvent                = binder.FirstCallTransaction + 0
	TransactionISessionControllerCallbackOnSessionDestroyed     = binder.FirstCallTransaction + 1
	TransactionISessionControllerCallbackOnPlaybackStateChanged = binder.FirstCallTransaction + 2
	TransactionISessionControllerCallbackOnMetadataChanged      = binder.FirstCallTransaction + 3
	TransactionISessionControllerCallbackOnQueueChanged         = binder.FirstCallTransaction + 4
	TransactionISessionControllerCallbackOnQueueTitleChanged    = binder.FirstCallTransaction + 5
	TransactionISessionControllerCallbackOnExtrasChanged        = binder.FirstCallTransaction + 6
	TransactionISessionControllerCallbackOnVolumeInfoChanged    = binder.FirstCallTransaction + 7
)
View Source
const (
	MethodISessionControllerCallbackOnEvent                = "onEvent"
	MethodISessionControllerCallbackOnSessionDestroyed     = "onSessionDestroyed"
	MethodISessionControllerCallbackOnPlaybackStateChanged = "onPlaybackStateChanged"
	MethodISessionControllerCallbackOnMetadataChanged      = "onMetadataChanged"
	MethodISessionControllerCallbackOnQueueChanged         = "onQueueChanged"
	MethodISessionControllerCallbackOnQueueTitleChanged    = "onQueueTitleChanged"
	MethodISessionControllerCallbackOnExtrasChanged        = "onExtrasChanged"
	MethodISessionControllerCallbackOnVolumeInfoChanged    = "onVolumeInfoChanged"
)
View Source
const (
	TransactionISessionManagerCreateSession                                  = binder.FirstCallTransaction + 0
	TransactionISessionManagerGetSessions                                    = binder.FirstCallTransaction + 1
	TransactionISessionManagerGetMediaKeyEventSession                        = binder.FirstCallTransaction + 2
	TransactionISessionManagerGetMediaKeyEventSessionPackageName             = binder.FirstCallTransaction + 3
	TransactionISessionManagerDispatchMediaKeyEvent                          = binder.FirstCallTransaction + 4
	TransactionISessionManagerDispatchMediaKeyEventToSessionAsSystemService  = binder.FirstCallTransaction + 5
	TransactionISessionManagerDispatchVolumeKeyEvent                         = binder.FirstCallTransaction + 6
	TransactionISessionManagerDispatchVolumeKeyEventToSessionAsSystemService = binder.FirstCallTransaction + 7
	TransactionISessionManagerDispatchAdjustVolume                           = binder.FirstCallTransaction + 8
	TransactionISessionManagerAddSessionsListener                            = binder.FirstCallTransaction + 9
	TransactionISessionManagerRemoveSessionsListener                         = binder.FirstCallTransaction + 10
	TransactionISessionManagerAddSession2TokensListener                      = binder.FirstCallTransaction + 11
	TransactionISessionManagerRemoveSession2TokensListener                   = binder.FirstCallTransaction + 12
	TransactionISessionManagerRegisterRemoteSessionCallback                  = binder.FirstCallTransaction + 13
	TransactionISessionManagerUnregisterRemoteSessionCallback                = binder.FirstCallTransaction + 14
	TransactionISessionManagerIsGlobalPriorityActive                         = binder.FirstCallTransaction + 15
	TransactionISessionManagerAddOnMediaKeyEventDispatchedListener           = binder.FirstCallTransaction + 16
	TransactionISessionManagerRemoveOnMediaKeyEventDispatchedListener        = binder.FirstCallTransaction + 17
	TransactionISessionManagerAddOnMediaKeyEventSessionChangedListener       = binder.FirstCallTransaction + 18
	TransactionISessionManagerRemoveOnMediaKeyEventSessionChangedListener    = binder.FirstCallTransaction + 19
	TransactionISessionManagerSetOnVolumeKeyLongPressListener                = binder.FirstCallTransaction + 20
	TransactionISessionManagerSetOnMediaKeyListener                          = binder.FirstCallTransaction + 21
	TransactionISessionManagerIsTrusted                                      = binder.FirstCallTransaction + 22
	TransactionISessionManagerSetCustomMediaKeyDispatcher                    = binder.FirstCallTransaction + 23
	TransactionISessionManagerSetCustomMediaSessionPolicyProvider            = binder.FirstCallTransaction + 24
	TransactionISessionManagerHasCustomMediaKeyDispatcher                    = binder.FirstCallTransaction + 25
	TransactionISessionManagerHasCustomMediaSessionPolicyProvider            = binder.FirstCallTransaction + 26
	TransactionISessionManagerGetSessionPolicies                             = binder.FirstCallTransaction + 27
	TransactionISessionManagerSetSessionPolicies                             = binder.FirstCallTransaction + 28
)
View Source
const (
	MethodISessionManagerCreateSession                                  = "createSession"
	MethodISessionManagerGetSessions                                    = "getSessions"
	MethodISessionManagerGetMediaKeyEventSession                        = "getMediaKeyEventSession"
	MethodISessionManagerGetMediaKeyEventSessionPackageName             = "getMediaKeyEventSessionPackageName"
	MethodISessionManagerDispatchMediaKeyEvent                          = "dispatchMediaKeyEvent"
	MethodISessionManagerDispatchMediaKeyEventToSessionAsSystemService  = "dispatchMediaKeyEventToSessionAsSystemService"
	MethodISessionManagerDispatchVolumeKeyEvent                         = "dispatchVolumeKeyEvent"
	MethodISessionManagerDispatchVolumeKeyEventToSessionAsSystemService = "dispatchVolumeKeyEventToSessionAsSystemService"
	MethodISessionManagerDispatchAdjustVolume                           = "dispatchAdjustVolume"
	MethodISessionManagerAddSessionsListener                            = "addSessionsListener"
	MethodISessionManagerRemoveSessionsListener                         = "removeSessionsListener"
	MethodISessionManagerAddSession2TokensListener                      = "addSession2TokensListener"
	MethodISessionManagerRemoveSession2TokensListener                   = "removeSession2TokensListener"
	MethodISessionManagerRegisterRemoteSessionCallback                  = "registerRemoteSessionCallback"
	MethodISessionManagerUnregisterRemoteSessionCallback                = "unregisterRemoteSessionCallback"
	MethodISessionManagerIsGlobalPriorityActive                         = "isGlobalPriorityActive"
	MethodISessionManagerAddOnMediaKeyEventDispatchedListener           = "addOnMediaKeyEventDispatchedListener"
	MethodISessionManagerRemoveOnMediaKeyEventDispatchedListener        = "removeOnMediaKeyEventDispatchedListener"
	MethodISessionManagerAddOnMediaKeyEventSessionChangedListener       = "addOnMediaKeyEventSessionChangedListener"
	MethodISessionManagerRemoveOnMediaKeyEventSessionChangedListener    = "removeOnMediaKeyEventSessionChangedListener"
	MethodISessionManagerSetOnVolumeKeyLongPressListener                = "setOnVolumeKeyLongPressListener"
	MethodISessionManagerSetOnMediaKeyListener                          = "setOnMediaKeyListener"
	MethodISessionManagerIsTrusted                                      = "isTrusted"
	MethodISessionManagerSetCustomMediaKeyDispatcher                    = "setCustomMediaKeyDispatcher"
	MethodISessionManagerSetCustomMediaSessionPolicyProvider            = "setCustomMediaSessionPolicyProvider"
	MethodISessionManagerHasCustomMediaKeyDispatcher                    = "hasCustomMediaKeyDispatcher"
	MethodISessionManagerHasCustomMediaSessionPolicyProvider            = "hasCustomMediaSessionPolicyProvider"
	MethodISessionManagerGetSessionPolicies                             = "getSessionPolicies"
	MethodISessionManagerSetSessionPolicies                             = "setSessionPolicies"
)
View Source
const DescriptorIActiveSessionsListener = "android.media.session.IActiveSessionsListener"
View Source
const DescriptorIOnMediaKeyEventDispatchedListener = "android.media.session.IOnMediaKeyEventDispatchedListener"
View Source
const DescriptorIOnMediaKeyEventSessionChangedListener = "android.media.session.IOnMediaKeyEventSessionChangedListener"
View Source
const DescriptorIOnMediaKeyListener = "android.media.session.IOnMediaKeyListener"
View Source
const DescriptorIOnVolumeKeyLongPressListener = "android.media.session.IOnVolumeKeyLongPressListener"
View Source
const DescriptorISession = "android.media.session.ISession"
View Source
const DescriptorISession2TokensListener = "android.media.session.ISession2TokensListener"
View Source
const DescriptorISessionCallback = "android.media.session.ISessionCallback"
View Source
const DescriptorISessionController = "android.media.session.ISessionController"
View Source
const DescriptorISessionControllerCallback = "android.media.session.ISessionControllerCallback"
View Source
const DescriptorISessionManager = "android.media.session.ISessionManager"
View Source
const (
	MethodIActiveSessionsListenerOnActiveSessionsChanged = "onActiveSessionsChanged"
)
View Source
const (
	MethodIOnMediaKeyEventDispatchedListenerOnMediaKeyEventDispatched = "onMediaKeyEventDispatched"
)
View Source
const (
	MethodIOnMediaKeyEventSessionChangedListenerOnMediaKeyEventSessionChanged = "onMediaKeyEventSessionChanged"
)
View Source
const (
	MethodIOnMediaKeyListenerOnMediaKey = "onMediaKey"
)
View Source
const (
	MethodIOnVolumeKeyLongPressListenerOnVolumeKeyLongPress = "onVolumeKeyLongPress"
)
View Source
const (
	MethodISession2TokensListenerOnSession2TokensChanged = "onSession2TokensChanged"
)
View Source
const (
	TransactionIActiveSessionsListenerOnActiveSessionsChanged = binder.FirstCallTransaction + 0
)
View Source
const (
	TransactionIOnMediaKeyEventDispatchedListenerOnMediaKeyEventDispatched = binder.FirstCallTransaction + 0
)
View Source
const (
	TransactionIOnMediaKeyEventSessionChangedListenerOnMediaKeyEventSessionChanged = binder.FirstCallTransaction + 0
)
View Source
const (
	TransactionIOnMediaKeyListenerOnMediaKey = binder.FirstCallTransaction + 0
)
View Source
const (
	TransactionIOnVolumeKeyLongPressListenerOnVolumeKeyLongPress = binder.FirstCallTransaction + 0
)
View Source
const (
	TransactionISession2TokensListenerOnSession2TokensChanged = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveSessionsListenerProxy

type ActiveSessionsListenerProxy struct {
	Remote binder.IBinder
}

func NewActiveSessionsListenerProxy

func NewActiveSessionsListenerProxy(
	remote binder.IBinder,
) *ActiveSessionsListenerProxy

func (*ActiveSessionsListenerProxy) AsBinder

func (*ActiveSessionsListenerProxy) OnActiveSessionsChanged

func (p *ActiveSessionsListenerProxy) OnActiveSessionsChanged(
	ctx context.Context,
	sessions []MediaSessionToken,
) error

type ActiveSessionsListenerStub

type ActiveSessionsListenerStub struct {
	Impl      IActiveSessionsListener
	Transport binder.VersionAwareTransport
}

ActiveSessionsListenerStub dispatches incoming binder transactions to a typed IActiveSessionsListener implementation.

func (*ActiveSessionsListenerStub) Descriptor

func (s *ActiveSessionsListenerStub) Descriptor() string

func (*ActiveSessionsListenerStub) OnTransaction

func (s *ActiveSessionsListenerStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type IActiveSessionsListener

type IActiveSessionsListener interface {
	AsBinder() binder.IBinder
	OnActiveSessionsChanged(ctx context.Context, sessions []MediaSessionToken) error
}

func NewActiveSessionsListenerStub

func NewActiveSessionsListenerStub(
	impl IActiveSessionsListenerServer,
) IActiveSessionsListener

NewActiveSessionsListenerStub creates a server-side IActiveSessionsListener wrapping the given server implementation. The returned value satisfies IActiveSessionsListener and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IActiveSessionsListenerServer

type IActiveSessionsListenerServer interface {
	OnActiveSessionsChanged(ctx context.Context, sessions []MediaSessionToken) error
}

IActiveSessionsListenerServer is the server-side interface that user implementations provide to NewActiveSessionsListenerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IOnMediaKeyEventDispatchedListener

type IOnMediaKeyEventDispatchedListener interface {
	AsBinder() binder.IBinder
	OnMediaKeyEventDispatched(ctx context.Context, event view.KeyEvent, packageName string, sessionToken MediaSessionToken) error
}

func NewOnMediaKeyEventDispatchedListenerStub

func NewOnMediaKeyEventDispatchedListenerStub(
	impl IOnMediaKeyEventDispatchedListenerServer,
) IOnMediaKeyEventDispatchedListener

NewOnMediaKeyEventDispatchedListenerStub creates a server-side IOnMediaKeyEventDispatchedListener wrapping the given server implementation. The returned value satisfies IOnMediaKeyEventDispatchedListener and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IOnMediaKeyEventDispatchedListenerServer

type IOnMediaKeyEventDispatchedListenerServer interface {
	OnMediaKeyEventDispatched(ctx context.Context, event view.KeyEvent, packageName string, sessionToken MediaSessionToken) error
}

IOnMediaKeyEventDispatchedListenerServer is the server-side interface that user implementations provide to NewOnMediaKeyEventDispatchedListenerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IOnMediaKeyEventSessionChangedListener

type IOnMediaKeyEventSessionChangedListener interface {
	AsBinder() binder.IBinder
	OnMediaKeyEventSessionChanged(ctx context.Context, packageName string, mediaKeyEventSessionToken MediaSessionToken) error
}

func NewOnMediaKeyEventSessionChangedListenerStub

func NewOnMediaKeyEventSessionChangedListenerStub(
	impl IOnMediaKeyEventSessionChangedListenerServer,
) IOnMediaKeyEventSessionChangedListener

NewOnMediaKeyEventSessionChangedListenerStub creates a server-side IOnMediaKeyEventSessionChangedListener wrapping the given server implementation. The returned value satisfies IOnMediaKeyEventSessionChangedListener and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IOnMediaKeyEventSessionChangedListenerServer

type IOnMediaKeyEventSessionChangedListenerServer interface {
	OnMediaKeyEventSessionChanged(ctx context.Context, packageName string, mediaKeyEventSessionToken MediaSessionToken) error
}

IOnMediaKeyEventSessionChangedListenerServer is the server-side interface that user implementations provide to NewOnMediaKeyEventSessionChangedListenerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IOnMediaKeyListener

type IOnMediaKeyListener interface {
	AsBinder() binder.IBinder
	OnMediaKey(ctx context.Context, event view.KeyEvent, result os.ResultReceiver) error
}

func NewOnMediaKeyListenerStub

func NewOnMediaKeyListenerStub(
	impl IOnMediaKeyListenerServer,
) IOnMediaKeyListener

NewOnMediaKeyListenerStub creates a server-side IOnMediaKeyListener wrapping the given server implementation. The returned value satisfies IOnMediaKeyListener and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IOnMediaKeyListenerServer

type IOnMediaKeyListenerServer interface {
	OnMediaKey(ctx context.Context, event view.KeyEvent, result os.ResultReceiver) error
}

IOnMediaKeyListenerServer is the server-side interface that user implementations provide to NewOnMediaKeyListenerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IOnVolumeKeyLongPressListener

type IOnVolumeKeyLongPressListener interface {
	AsBinder() binder.IBinder
	OnVolumeKeyLongPress(ctx context.Context, event view.KeyEvent) error
}

func NewOnVolumeKeyLongPressListenerStub

func NewOnVolumeKeyLongPressListenerStub(
	impl IOnVolumeKeyLongPressListenerServer,
) IOnVolumeKeyLongPressListener

NewOnVolumeKeyLongPressListenerStub creates a server-side IOnVolumeKeyLongPressListener wrapping the given server implementation. The returned value satisfies IOnVolumeKeyLongPressListener and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IOnVolumeKeyLongPressListenerServer

type IOnVolumeKeyLongPressListenerServer interface {
	OnVolumeKeyLongPress(ctx context.Context, event view.KeyEvent) error
}

IOnVolumeKeyLongPressListenerServer is the server-side interface that user implementations provide to NewOnVolumeKeyLongPressListenerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type ISession

type ISession interface {
	AsBinder() binder.IBinder
	SendEvent(ctx context.Context, event string, data os.Bundle) error
	GetController(ctx context.Context) (ISessionController, error)
	SetFlags(ctx context.Context, flags int32) error
	SetActive(ctx context.Context, active bool) error
	SetMediaButtonReceiver(ctx context.Context, mbr types.PendingIntent) error
	SetMediaButtonBroadcastReceiver(ctx context.Context, broadcastReceiver content.ComponentName) error
	SetLaunchPendingIntent(ctx context.Context, pi types.PendingIntent) error
	DestroySession(ctx context.Context) error
	SetMetadata(ctx context.Context, metadata mediaTypes.MediaMetadata, duration int64, metadataDescription string) error
	SetPlaybackState(ctx context.Context, state PlaybackState) error
	ResetQueue(ctx context.Context) error
	GetBinderForSetQueue(ctx context.Context) (binder.IBinder, error)
	SetQueueTitle(ctx context.Context, title string) error
	SetExtras(ctx context.Context, extras os.Bundle) error
	SetRatingType(ctx context.Context, type_ int32) error
	SetPlaybackToLocal(ctx context.Context, attributes mediaTypes.AudioAttributes) error
	SetPlaybackToRemote(ctx context.Context, control int32, max_ int32, controlId string) error
	SetCurrentVolume(ctx context.Context, currentVolume int32) error
}

func NewSessionStub

func NewSessionStub(
	impl ISessionServer,
) ISession

NewSessionStub creates a server-side ISession wrapping the given server implementation. The returned value satisfies ISession and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type ISession2TokensListener

type ISession2TokensListener interface {
	AsBinder() binder.IBinder
	OnSession2TokensChanged(ctx context.Context, tokens []any) error
}

func NewSession2TokensListenerStub

func NewSession2TokensListenerStub(
	impl ISession2TokensListenerServer,
) ISession2TokensListener

NewSession2TokensListenerStub creates a server-side ISession2TokensListener wrapping the given server implementation. The returned value satisfies ISession2TokensListener and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type ISession2TokensListenerServer

type ISession2TokensListenerServer interface {
	OnSession2TokensChanged(ctx context.Context, tokens []any) error
}

ISession2TokensListenerServer is the server-side interface that user implementations provide to NewSession2TokensListenerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type ISessionCallback

type ISessionCallback interface {
	AsBinder() binder.IBinder
	OnCommand(ctx context.Context, packageName string, pid int32, uid int32, command string, args os.Bundle, cb os.ResultReceiver) error
	OnMediaButton(ctx context.Context, packageName string, pid int32, uid int32, mediaButtonIntent content.Intent, sequenceNumber int32, cb os.ResultReceiver) error
	OnMediaButtonFromController(ctx context.Context, packageName string, pid int32, uid int32, mediaButtonIntent content.Intent) error
	OnPrepare(ctx context.Context, packageName string, pid int32, uid int32) error
	OnPrepareFromMediaId(ctx context.Context, packageName string, pid int32, uid int32, mediaId string, extras os.Bundle) error
	OnPrepareFromSearch(ctx context.Context, packageName string, pid int32, uid int32, query string, extras os.Bundle) error
	OnPrepareFromUri(ctx context.Context, packageName string, pid int32, uid int32, uri net.Uri, extras os.Bundle) error
	OnPlay(ctx context.Context, packageName string, pid int32, uid int32) error
	OnPlayFromMediaId(ctx context.Context, packageName string, pid int32, uid int32, mediaId string, extras os.Bundle) error
	OnPlayFromSearch(ctx context.Context, packageName string, pid int32, uid int32, query string, extras os.Bundle) error
	OnPlayFromUri(ctx context.Context, packageName string, pid int32, uid int32, uri net.Uri, extras os.Bundle) error
	OnSkipToTrack(ctx context.Context, packageName string, pid int32, uid int32, id int64) error
	OnPause(ctx context.Context, packageName string, pid int32, uid int32) error
	OnStop(ctx context.Context, packageName string, pid int32, uid int32) error
	OnNext(ctx context.Context, packageName string, pid int32, uid int32) error
	OnPrevious(ctx context.Context, packageName string, pid int32, uid int32) error
	OnFastForward(ctx context.Context, packageName string, pid int32, uid int32) error
	OnRewind(ctx context.Context, packageName string, pid int32, uid int32) error
	OnSeekTo(ctx context.Context, packageName string, pid int32, uid int32, pos int64) error
	OnRate(ctx context.Context, packageName string, pid int32, uid int32, rating types.Rating) error
	OnSetPlaybackSpeed(ctx context.Context, packageName string, pid int32, uid int32, speed float32) error
	OnCustomAction(ctx context.Context, packageName string, pid int32, uid int32, action string, args os.Bundle) error
	OnAdjustVolume(ctx context.Context, packageName string, pid int32, uid int32, direction int32) error
	OnSetVolumeTo(ctx context.Context, packageName string, pid int32, uid int32, value int32) error
}

func NewSessionCallbackStub

func NewSessionCallbackStub(
	impl ISessionCallbackServer,
) ISessionCallback

NewSessionCallbackStub creates a server-side ISessionCallback wrapping the given server implementation. The returned value satisfies ISessionCallback and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type ISessionCallbackServer

type ISessionCallbackServer interface {
	OnCommand(ctx context.Context, packageName string, pid int32, uid int32, command string, args os.Bundle, cb os.ResultReceiver) error
	OnMediaButton(ctx context.Context, packageName string, pid int32, uid int32, mediaButtonIntent content.Intent, sequenceNumber int32, cb os.ResultReceiver) error
	OnMediaButtonFromController(ctx context.Context, packageName string, pid int32, uid int32, mediaButtonIntent content.Intent) error
	OnPrepare(ctx context.Context, packageName string, pid int32, uid int32) error
	OnPrepareFromMediaId(ctx context.Context, packageName string, pid int32, uid int32, mediaId string, extras os.Bundle) error
	OnPrepareFromSearch(ctx context.Context, packageName string, pid int32, uid int32, query string, extras os.Bundle) error
	OnPrepareFromUri(ctx context.Context, packageName string, pid int32, uid int32, uri net.Uri, extras os.Bundle) error
	OnPlay(ctx context.Context, packageName string, pid int32, uid int32) error
	OnPlayFromMediaId(ctx context.Context, packageName string, pid int32, uid int32, mediaId string, extras os.Bundle) error
	OnPlayFromSearch(ctx context.Context, packageName string, pid int32, uid int32, query string, extras os.Bundle) error
	OnPlayFromUri(ctx context.Context, packageName string, pid int32, uid int32, uri net.Uri, extras os.Bundle) error
	OnSkipToTrack(ctx context.Context, packageName string, pid int32, uid int32, id int64) error
	OnPause(ctx context.Context, packageName string, pid int32, uid int32) error
	OnStop(ctx context.Context, packageName string, pid int32, uid int32) error
	OnNext(ctx context.Context, packageName string, pid int32, uid int32) error
	OnPrevious(ctx context.Context, packageName string, pid int32, uid int32) error
	OnFastForward(ctx context.Context, packageName string, pid int32, uid int32) error
	OnRewind(ctx context.Context, packageName string, pid int32, uid int32) error
	OnSeekTo(ctx context.Context, packageName string, pid int32, uid int32, pos int64) error
	OnRate(ctx context.Context, packageName string, pid int32, uid int32, rating types.Rating) error
	OnSetPlaybackSpeed(ctx context.Context, packageName string, pid int32, uid int32, speed float32) error
	OnCustomAction(ctx context.Context, packageName string, pid int32, uid int32, action string, args os.Bundle) error
	OnAdjustVolume(ctx context.Context, packageName string, pid int32, uid int32, direction int32) error
	OnSetVolumeTo(ctx context.Context, packageName string, pid int32, uid int32, value int32) error
}

ISessionCallbackServer is the server-side interface that user implementations provide to NewSessionCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type ISessionController

type ISessionController interface {
	AsBinder() binder.IBinder
	SendCommand(ctx context.Context, packageName string, command string, args os.Bundle, cb os.ResultReceiver) error
	SendMediaButton(ctx context.Context, packageName string, mediaButton view.KeyEvent) (bool, error)
	RegisterCallback(ctx context.Context, packageName string, cb ISessionControllerCallback) error
	UnregisterCallback(ctx context.Context, cb ISessionControllerCallback) error
	GetPackageName(ctx context.Context) (string, error)
	GetTag(ctx context.Context) (string, error)
	GetSessionInfo(ctx context.Context) (os.Bundle, error)
	GetLaunchPendingIntent(ctx context.Context) (types.PendingIntent, error)
	GetFlags(ctx context.Context) (int64, error)
	GetVolumeAttributes(ctx context.Context) (MediaControllerPlaybackInfo, error)
	AdjustVolume(ctx context.Context, packageName string, direction int32, flags int32) error
	SetVolumeTo(ctx context.Context, packageName string, value int32, flags int32) error
	Prepare(ctx context.Context, packageName string) error
	PrepareFromMediaId(ctx context.Context, packageName string, mediaId string, extras os.Bundle) error
	PrepareFromSearch(ctx context.Context, packageName string, string_ string, extras os.Bundle) error
	PrepareFromUri(ctx context.Context, packageName string, uri net.Uri, extras os.Bundle) error
	Play(ctx context.Context, packageName string) error
	PlayFromMediaId(ctx context.Context, packageName string, mediaId string, extras os.Bundle) error
	PlayFromSearch(ctx context.Context, packageName string, string_ string, extras os.Bundle) error
	PlayFromUri(ctx context.Context, packageName string, uri net.Uri, extras os.Bundle) error
	SkipToQueueItem(ctx context.Context, packageName string, id int64) error
	Pause(ctx context.Context, packageName string) error
	Stop(ctx context.Context, packageName string) error
	Next(ctx context.Context, packageName string) error
	Previous(ctx context.Context, packageName string) error
	FastForward(ctx context.Context, packageName string) error
	Rewind(ctx context.Context, packageName string) error
	SeekTo(ctx context.Context, packageName string, pos int64) error
	Rate(ctx context.Context, packageName string, rating mediaTypes.Rating) error
	SetPlaybackSpeed(ctx context.Context, packageName string, speed float32) error
	SendCustomAction(ctx context.Context, packageName string, action string, args os.Bundle) error
	GetMetadata(ctx context.Context) (mediaTypes.MediaMetadata, error)
	GetPlaybackState(ctx context.Context) (PlaybackState, error)
	GetQueue(ctx context.Context) (pmTypes.ParceledListSlice, error)
	GetQueueTitle(ctx context.Context) (string, error)
	GetExtras(ctx context.Context) (os.Bundle, error)
	GetRatingType(ctx context.Context) (int32, error)
}

func NewSessionControllerStub

func NewSessionControllerStub(
	impl ISessionControllerServer,
) ISessionController

NewSessionControllerStub creates a server-side ISessionController wrapping the given server implementation. The returned value satisfies ISessionController and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type ISessionControllerCallback

type ISessionControllerCallback interface {
	AsBinder() binder.IBinder
	OnEvent(ctx context.Context, event string, extras os.Bundle) error
	OnSessionDestroyed(ctx context.Context) error
	OnPlaybackStateChanged(ctx context.Context, state PlaybackState) error
	OnMetadataChanged(ctx context.Context, metadata types.MediaMetadata) error
	OnQueueChanged(ctx context.Context, queue pmTypes.ParceledListSlice) error
	OnQueueTitleChanged(ctx context.Context, title string) error
	OnExtrasChanged(ctx context.Context, extras os.Bundle) error
	OnVolumeInfoChanged(ctx context.Context, info MediaControllerPlaybackInfo) error
}

func NewSessionControllerCallbackStub

func NewSessionControllerCallbackStub(
	impl ISessionControllerCallbackServer,
) ISessionControllerCallback

NewSessionControllerCallbackStub creates a server-side ISessionControllerCallback wrapping the given server implementation. The returned value satisfies ISessionControllerCallback and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type ISessionControllerCallbackServer

type ISessionControllerCallbackServer interface {
	OnEvent(ctx context.Context, event string, extras os.Bundle) error
	OnSessionDestroyed(ctx context.Context) error
	OnPlaybackStateChanged(ctx context.Context, state PlaybackState) error
	OnMetadataChanged(ctx context.Context, metadata types.MediaMetadata) error
	OnQueueChanged(ctx context.Context, queue pmTypes.ParceledListSlice) error
	OnQueueTitleChanged(ctx context.Context, title string) error
	OnExtrasChanged(ctx context.Context, extras os.Bundle) error
	OnVolumeInfoChanged(ctx context.Context, info MediaControllerPlaybackInfo) error
}

ISessionControllerCallbackServer is the server-side interface that user implementations provide to NewSessionControllerCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type ISessionControllerServer

type ISessionControllerServer interface {
	SendCommand(ctx context.Context, packageName string, command string, args os.Bundle, cb os.ResultReceiver) error
	SendMediaButton(ctx context.Context, packageName string, mediaButton view.KeyEvent) (bool, error)
	RegisterCallback(ctx context.Context, packageName string, cb ISessionControllerCallback) error
	UnregisterCallback(ctx context.Context, cb ISessionControllerCallback) error
	GetPackageName(ctx context.Context) (string, error)
	GetTag(ctx context.Context) (string, error)
	GetSessionInfo(ctx context.Context) (os.Bundle, error)
	GetLaunchPendingIntent(ctx context.Context) (types.PendingIntent, error)
	GetFlags(ctx context.Context) (int64, error)
	GetVolumeAttributes(ctx context.Context) (MediaControllerPlaybackInfo, error)
	AdjustVolume(ctx context.Context, packageName string, direction int32, flags int32) error
	SetVolumeTo(ctx context.Context, packageName string, value int32, flags int32) error
	Prepare(ctx context.Context, packageName string) error
	PrepareFromMediaId(ctx context.Context, packageName string, mediaId string, extras os.Bundle) error
	PrepareFromSearch(ctx context.Context, packageName string, string_ string, extras os.Bundle) error
	PrepareFromUri(ctx context.Context, packageName string, uri net.Uri, extras os.Bundle) error
	Play(ctx context.Context, packageName string) error
	PlayFromMediaId(ctx context.Context, packageName string, mediaId string, extras os.Bundle) error
	PlayFromSearch(ctx context.Context, packageName string, string_ string, extras os.Bundle) error
	PlayFromUri(ctx context.Context, packageName string, uri net.Uri, extras os.Bundle) error
	SkipToQueueItem(ctx context.Context, packageName string, id int64) error
	Pause(ctx context.Context, packageName string) error
	Stop(ctx context.Context, packageName string) error
	Next(ctx context.Context, packageName string) error
	Previous(ctx context.Context, packageName string) error
	FastForward(ctx context.Context, packageName string) error
	Rewind(ctx context.Context, packageName string) error
	SeekTo(ctx context.Context, packageName string, pos int64) error
	Rate(ctx context.Context, packageName string, rating mediaTypes.Rating) error
	SetPlaybackSpeed(ctx context.Context, packageName string, speed float32) error
	SendCustomAction(ctx context.Context, packageName string, action string, args os.Bundle) error
	GetMetadata(ctx context.Context) (mediaTypes.MediaMetadata, error)
	GetPlaybackState(ctx context.Context) (PlaybackState, error)
	GetQueue(ctx context.Context) (pmTypes.ParceledListSlice, error)
	GetQueueTitle(ctx context.Context) (string, error)
	GetExtras(ctx context.Context) (os.Bundle, error)
	GetRatingType(ctx context.Context) (int32, error)
}

ISessionControllerServer is the server-side interface that user implementations provide to NewSessionControllerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type ISessionManager

type ISessionManager interface {
	AsBinder() binder.IBinder
	CreateSession(ctx context.Context, packageName string, sessionCb ISessionCallback, tag string, sessionInfo os.Bundle) (ISession, error)
	GetSessions(ctx context.Context, compName content.ComponentName) ([]MediaSessionToken, error)
	GetMediaKeyEventSession(ctx context.Context, packageName string) (MediaSessionToken, error)
	GetMediaKeyEventSessionPackageName(ctx context.Context, packageName string) (string, error)
	DispatchMediaKeyEvent(ctx context.Context, packageName string, asSystemService bool, keyEvent view.KeyEvent, needWakeLock bool) error
	DispatchMediaKeyEventToSessionAsSystemService(ctx context.Context, packageName string, keyEvent view.KeyEvent, sessionToken MediaSessionToken) (bool, error)
	DispatchVolumeKeyEvent(ctx context.Context, packageName string, asSystemService bool, keyEvent view.KeyEvent, stream int32, musicOnly bool) error
	DispatchVolumeKeyEventToSessionAsSystemService(ctx context.Context, packageName string, keyEvent view.KeyEvent, sessionToken MediaSessionToken) error
	DispatchAdjustVolume(ctx context.Context, packageName string, suggestedStream int32, delta int32, flags int32) error
	AddSessionsListener(ctx context.Context, listener IActiveSessionsListener, compName content.ComponentName) error
	RemoveSessionsListener(ctx context.Context, listener IActiveSessionsListener) error
	AddSession2TokensListener(ctx context.Context, listener ISession2TokensListener) error
	RemoveSession2TokensListener(ctx context.Context, listener ISession2TokensListener) error
	RegisterRemoteSessionCallback(ctx context.Context, rvc types.IRemoteSessionCallback) error
	UnregisterRemoteSessionCallback(ctx context.Context, rvc types.IRemoteSessionCallback) error
	IsGlobalPriorityActive(ctx context.Context) (bool, error)
	AddOnMediaKeyEventDispatchedListener(ctx context.Context, listener IOnMediaKeyEventDispatchedListener) error
	RemoveOnMediaKeyEventDispatchedListener(ctx context.Context, listener IOnMediaKeyEventDispatchedListener) error
	AddOnMediaKeyEventSessionChangedListener(ctx context.Context, listener IOnMediaKeyEventSessionChangedListener, packageName string) error
	RemoveOnMediaKeyEventSessionChangedListener(ctx context.Context, listener IOnMediaKeyEventSessionChangedListener) error
	SetOnVolumeKeyLongPressListener(ctx context.Context, listener IOnVolumeKeyLongPressListener) error
	SetOnMediaKeyListener(ctx context.Context, listener IOnMediaKeyListener) error
	IsTrusted(ctx context.Context, controllerPackageName string, controllerPid int32, controllerUid int32) (bool, error)
	SetCustomMediaKeyDispatcher(ctx context.Context, name string) error
	SetCustomMediaSessionPolicyProvider(ctx context.Context, name string) error
	HasCustomMediaKeyDispatcher(ctx context.Context, componentName string) (bool, error)
	HasCustomMediaSessionPolicyProvider(ctx context.Context, componentName string) (bool, error)
	GetSessionPolicies(ctx context.Context, token MediaSessionToken) (int32, error)
	SetSessionPolicies(ctx context.Context, token MediaSessionToken, policies int32) error
}

func NewSessionManagerStub

func NewSessionManagerStub(
	impl ISessionManagerServer,
) ISessionManager

NewSessionManagerStub creates a server-side ISessionManager wrapping the given server implementation. The returned value satisfies ISessionManager and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type ISessionManagerServer

type ISessionManagerServer interface {
	CreateSession(ctx context.Context, packageName string, sessionCb ISessionCallback, tag string, sessionInfo os.Bundle) (ISession, error)
	GetSessions(ctx context.Context, compName content.ComponentName) ([]MediaSessionToken, error)
	GetMediaKeyEventSession(ctx context.Context, packageName string) (MediaSessionToken, error)
	GetMediaKeyEventSessionPackageName(ctx context.Context, packageName string) (string, error)
	DispatchMediaKeyEvent(ctx context.Context, packageName string, asSystemService bool, keyEvent view.KeyEvent, needWakeLock bool) error
	DispatchMediaKeyEventToSessionAsSystemService(ctx context.Context, packageName string, keyEvent view.KeyEvent, sessionToken MediaSessionToken) (bool, error)
	DispatchVolumeKeyEvent(ctx context.Context, packageName string, asSystemService bool, keyEvent view.KeyEvent, stream int32, musicOnly bool) error
	DispatchVolumeKeyEventToSessionAsSystemService(ctx context.Context, packageName string, keyEvent view.KeyEvent, sessionToken MediaSessionToken) error
	DispatchAdjustVolume(ctx context.Context, packageName string, suggestedStream int32, delta int32, flags int32) error
	AddSessionsListener(ctx context.Context, listener IActiveSessionsListener, compName content.ComponentName) error
	RemoveSessionsListener(ctx context.Context, listener IActiveSessionsListener) error
	AddSession2TokensListener(ctx context.Context, listener ISession2TokensListener) error
	RemoveSession2TokensListener(ctx context.Context, listener ISession2TokensListener) error
	RegisterRemoteSessionCallback(ctx context.Context, rvc types.IRemoteSessionCallback) error
	UnregisterRemoteSessionCallback(ctx context.Context, rvc types.IRemoteSessionCallback) error
	IsGlobalPriorityActive(ctx context.Context) (bool, error)
	AddOnMediaKeyEventDispatchedListener(ctx context.Context, listener IOnMediaKeyEventDispatchedListener) error
	RemoveOnMediaKeyEventDispatchedListener(ctx context.Context, listener IOnMediaKeyEventDispatchedListener) error
	AddOnMediaKeyEventSessionChangedListener(ctx context.Context, listener IOnMediaKeyEventSessionChangedListener, packageName string) error
	RemoveOnMediaKeyEventSessionChangedListener(ctx context.Context, listener IOnMediaKeyEventSessionChangedListener) error
	SetOnVolumeKeyLongPressListener(ctx context.Context, listener IOnVolumeKeyLongPressListener) error
	SetOnMediaKeyListener(ctx context.Context, listener IOnMediaKeyListener) error
	IsTrusted(ctx context.Context, controllerPackageName string, controllerPid int32, controllerUid int32) (bool, error)
	SetCustomMediaKeyDispatcher(ctx context.Context, name string) error
	SetCustomMediaSessionPolicyProvider(ctx context.Context, name string) error
	HasCustomMediaKeyDispatcher(ctx context.Context, componentName string) (bool, error)
	HasCustomMediaSessionPolicyProvider(ctx context.Context, componentName string) (bool, error)
	GetSessionPolicies(ctx context.Context, token MediaSessionToken) (int32, error)
	SetSessionPolicies(ctx context.Context, token MediaSessionToken, policies int32) error
}

ISessionManagerServer is the server-side interface that user implementations provide to NewSessionManagerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type ISessionServer

type ISessionServer interface {
	SendEvent(ctx context.Context, event string, data os.Bundle) error
	GetController(ctx context.Context) (ISessionController, error)
	SetFlags(ctx context.Context, flags int32) error
	SetActive(ctx context.Context, active bool) error
	SetMediaButtonReceiver(ctx context.Context, mbr types.PendingIntent) error
	SetMediaButtonBroadcastReceiver(ctx context.Context, broadcastReceiver content.ComponentName) error
	SetLaunchPendingIntent(ctx context.Context, pi types.PendingIntent) error
	DestroySession(ctx context.Context) error
	SetMetadata(ctx context.Context, metadata mediaTypes.MediaMetadata, duration int64, metadataDescription string) error
	SetPlaybackState(ctx context.Context, state PlaybackState) error
	ResetQueue(ctx context.Context) error
	GetBinderForSetQueue(ctx context.Context) (binder.IBinder, error)
	SetQueueTitle(ctx context.Context, title string) error
	SetExtras(ctx context.Context, extras os.Bundle) error
	SetRatingType(ctx context.Context, type_ int32) error
	SetPlaybackToLocal(ctx context.Context, attributes mediaTypes.AudioAttributes) error
	SetPlaybackToRemote(ctx context.Context, control int32, max_ int32, controlId string) error
	SetCurrentVolume(ctx context.Context, currentVolume int32) error
}

ISessionServer is the server-side interface that user implementations provide to NewSessionStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type MediaControllerPlaybackInfo

type MediaControllerPlaybackInfo struct {
}

func (*MediaControllerPlaybackInfo) MarshalParcel

func (s *MediaControllerPlaybackInfo) MarshalParcel(
	p *parcel.Parcel,
) error

func (*MediaControllerPlaybackInfo) UnmarshalParcel

func (s *MediaControllerPlaybackInfo) UnmarshalParcel(
	p *parcel.Parcel,
) error

type MediaSessionQueueItem

type MediaSessionQueueItem struct {
}

func (*MediaSessionQueueItem) MarshalParcel

func (s *MediaSessionQueueItem) MarshalParcel(
	p *parcel.Parcel,
) error

func (*MediaSessionQueueItem) UnmarshalParcel

func (s *MediaSessionQueueItem) UnmarshalParcel(
	p *parcel.Parcel,
) error

type MediaSessionToken

type MediaSessionToken struct {
}

func (*MediaSessionToken) MarshalParcel

func (s *MediaSessionToken) MarshalParcel(
	p *parcel.Parcel,
) error

func (*MediaSessionToken) UnmarshalParcel

func (s *MediaSessionToken) UnmarshalParcel(
	p *parcel.Parcel,
) error

type OnMediaKeyEventDispatchedListenerProxy

type OnMediaKeyEventDispatchedListenerProxy struct {
	Remote binder.IBinder
}

func NewOnMediaKeyEventDispatchedListenerProxy

func NewOnMediaKeyEventDispatchedListenerProxy(
	remote binder.IBinder,
) *OnMediaKeyEventDispatchedListenerProxy

func (*OnMediaKeyEventDispatchedListenerProxy) AsBinder

func (*OnMediaKeyEventDispatchedListenerProxy) OnMediaKeyEventDispatched

func (p *OnMediaKeyEventDispatchedListenerProxy) OnMediaKeyEventDispatched(
	ctx context.Context,
	event view.KeyEvent,
	packageName string,
	sessionToken MediaSessionToken,
) error

type OnMediaKeyEventDispatchedListenerStub

type OnMediaKeyEventDispatchedListenerStub struct {
	Impl      IOnMediaKeyEventDispatchedListener
	Transport binder.VersionAwareTransport
}

OnMediaKeyEventDispatchedListenerStub dispatches incoming binder transactions to a typed IOnMediaKeyEventDispatchedListener implementation.

func (*OnMediaKeyEventDispatchedListenerStub) Descriptor

func (*OnMediaKeyEventDispatchedListenerStub) OnTransaction

type OnMediaKeyEventSessionChangedListenerProxy

type OnMediaKeyEventSessionChangedListenerProxy struct {
	Remote binder.IBinder
}

func NewOnMediaKeyEventSessionChangedListenerProxy

func NewOnMediaKeyEventSessionChangedListenerProxy(
	remote binder.IBinder,
) *OnMediaKeyEventSessionChangedListenerProxy

func (*OnMediaKeyEventSessionChangedListenerProxy) AsBinder

func (*OnMediaKeyEventSessionChangedListenerProxy) OnMediaKeyEventSessionChanged

func (p *OnMediaKeyEventSessionChangedListenerProxy) OnMediaKeyEventSessionChanged(
	ctx context.Context,
	packageName string,
	mediaKeyEventSessionToken MediaSessionToken,
) error

type OnMediaKeyEventSessionChangedListenerStub

type OnMediaKeyEventSessionChangedListenerStub struct {
	Impl      IOnMediaKeyEventSessionChangedListener
	Transport binder.VersionAwareTransport
}

OnMediaKeyEventSessionChangedListenerStub dispatches incoming binder transactions to a typed IOnMediaKeyEventSessionChangedListener implementation.

func (*OnMediaKeyEventSessionChangedListenerStub) Descriptor

func (*OnMediaKeyEventSessionChangedListenerStub) OnTransaction

type OnMediaKeyListenerProxy

type OnMediaKeyListenerProxy struct {
	Remote binder.IBinder
}

func NewOnMediaKeyListenerProxy

func NewOnMediaKeyListenerProxy(
	remote binder.IBinder,
) *OnMediaKeyListenerProxy

func (*OnMediaKeyListenerProxy) AsBinder

func (p *OnMediaKeyListenerProxy) AsBinder() binder.IBinder

func (*OnMediaKeyListenerProxy) OnMediaKey

func (p *OnMediaKeyListenerProxy) OnMediaKey(
	ctx context.Context,
	event view.KeyEvent,
	result os.ResultReceiver,
) error

type OnMediaKeyListenerStub

type OnMediaKeyListenerStub struct {
	Impl      IOnMediaKeyListener
	Transport binder.VersionAwareTransport
}

OnMediaKeyListenerStub dispatches incoming binder transactions to a typed IOnMediaKeyListener implementation.

func (*OnMediaKeyListenerStub) Descriptor

func (s *OnMediaKeyListenerStub) Descriptor() string

func (*OnMediaKeyListenerStub) OnTransaction

func (s *OnMediaKeyListenerStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type OnVolumeKeyLongPressListenerProxy

type OnVolumeKeyLongPressListenerProxy struct {
	Remote binder.IBinder
}

func NewOnVolumeKeyLongPressListenerProxy

func NewOnVolumeKeyLongPressListenerProxy(
	remote binder.IBinder,
) *OnVolumeKeyLongPressListenerProxy

func (*OnVolumeKeyLongPressListenerProxy) AsBinder

func (*OnVolumeKeyLongPressListenerProxy) OnVolumeKeyLongPress

func (p *OnVolumeKeyLongPressListenerProxy) OnVolumeKeyLongPress(
	ctx context.Context,
	event view.KeyEvent,
) error

type OnVolumeKeyLongPressListenerStub

type OnVolumeKeyLongPressListenerStub struct {
	Impl      IOnVolumeKeyLongPressListener
	Transport binder.VersionAwareTransport
}

OnVolumeKeyLongPressListenerStub dispatches incoming binder transactions to a typed IOnVolumeKeyLongPressListener implementation.

func (*OnVolumeKeyLongPressListenerStub) Descriptor

func (s *OnVolumeKeyLongPressListenerStub) Descriptor() string

func (*OnVolumeKeyLongPressListenerStub) OnTransaction

type PlaybackState

type PlaybackState struct {
	State            int32
	Position         int64
	Speed            float32
	UpdateTime       int64
	BufferedPosition int64
	Actions          int64
	ActiveItemId     int64
}

func (*PlaybackState) MarshalParcel

func (s *PlaybackState) MarshalParcel(
	p *parcel.Parcel,
) error

func (*PlaybackState) UnmarshalParcel

func (s *PlaybackState) UnmarshalParcel(
	p *parcel.Parcel,
) error

type Session2TokensListenerProxy

type Session2TokensListenerProxy struct {
	Remote binder.IBinder
}

func NewSession2TokensListenerProxy

func NewSession2TokensListenerProxy(
	remote binder.IBinder,
) *Session2TokensListenerProxy

func (*Session2TokensListenerProxy) AsBinder

func (*Session2TokensListenerProxy) OnSession2TokensChanged

func (p *Session2TokensListenerProxy) OnSession2TokensChanged(
	ctx context.Context,
	tokens []any,
) error

type Session2TokensListenerStub

type Session2TokensListenerStub struct {
	Impl      ISession2TokensListener
	Transport binder.VersionAwareTransport
}

Session2TokensListenerStub dispatches incoming binder transactions to a typed ISession2TokensListener implementation.

func (*Session2TokensListenerStub) Descriptor

func (s *Session2TokensListenerStub) Descriptor() string

func (*Session2TokensListenerStub) OnTransaction

func (s *Session2TokensListenerStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type SessionCallbackProxy

type SessionCallbackProxy struct {
	Remote binder.IBinder
}

func NewSessionCallbackProxy

func NewSessionCallbackProxy(
	remote binder.IBinder,
) *SessionCallbackProxy

func (*SessionCallbackProxy) AsBinder

func (p *SessionCallbackProxy) AsBinder() binder.IBinder

func (*SessionCallbackProxy) OnAdjustVolume

func (p *SessionCallbackProxy) OnAdjustVolume(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
	direction int32,
) error

func (*SessionCallbackProxy) OnCommand

func (p *SessionCallbackProxy) OnCommand(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
	command string,
	args os.Bundle,
	cb os.ResultReceiver,
) error

func (*SessionCallbackProxy) OnCustomAction

func (p *SessionCallbackProxy) OnCustomAction(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
	action string,
	args os.Bundle,
) error

func (*SessionCallbackProxy) OnFastForward

func (p *SessionCallbackProxy) OnFastForward(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
) error

func (*SessionCallbackProxy) OnMediaButton

func (p *SessionCallbackProxy) OnMediaButton(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
	mediaButtonIntent content.Intent,
	sequenceNumber int32,
	cb os.ResultReceiver,
) error

func (*SessionCallbackProxy) OnMediaButtonFromController

func (p *SessionCallbackProxy) OnMediaButtonFromController(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
	mediaButtonIntent content.Intent,
) error

func (*SessionCallbackProxy) OnNext

func (p *SessionCallbackProxy) OnNext(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
) error

func (*SessionCallbackProxy) OnPause

func (p *SessionCallbackProxy) OnPause(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
) error

func (*SessionCallbackProxy) OnPlay

func (p *SessionCallbackProxy) OnPlay(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
) error

func (*SessionCallbackProxy) OnPlayFromMediaId

func (p *SessionCallbackProxy) OnPlayFromMediaId(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
	mediaId string,
	extras os.Bundle,
) error

func (*SessionCallbackProxy) OnPlayFromSearch

func (p *SessionCallbackProxy) OnPlayFromSearch(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
	query string,
	extras os.Bundle,
) error

func (*SessionCallbackProxy) OnPlayFromUri

func (p *SessionCallbackProxy) OnPlayFromUri(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
	uri net.Uri,
	extras os.Bundle,
) error

func (*SessionCallbackProxy) OnPrepare

func (p *SessionCallbackProxy) OnPrepare(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
) error

func (*SessionCallbackProxy) OnPrepareFromMediaId

func (p *SessionCallbackProxy) OnPrepareFromMediaId(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
	mediaId string,
	extras os.Bundle,
) error

func (*SessionCallbackProxy) OnPrepareFromSearch

func (p *SessionCallbackProxy) OnPrepareFromSearch(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
	query string,
	extras os.Bundle,
) error

func (*SessionCallbackProxy) OnPrepareFromUri

func (p *SessionCallbackProxy) OnPrepareFromUri(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
	uri net.Uri,
	extras os.Bundle,
) error

func (*SessionCallbackProxy) OnPrevious

func (p *SessionCallbackProxy) OnPrevious(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
) error

func (*SessionCallbackProxy) OnRate

func (p *SessionCallbackProxy) OnRate(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
	rating types.Rating,
) error

func (*SessionCallbackProxy) OnRewind

func (p *SessionCallbackProxy) OnRewind(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
) error

func (*SessionCallbackProxy) OnSeekTo

func (p *SessionCallbackProxy) OnSeekTo(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
	pos int64,
) error

func (*SessionCallbackProxy) OnSetPlaybackSpeed

func (p *SessionCallbackProxy) OnSetPlaybackSpeed(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
	speed float32,
) error

func (*SessionCallbackProxy) OnSetVolumeTo

func (p *SessionCallbackProxy) OnSetVolumeTo(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
	value int32,
) error

func (*SessionCallbackProxy) OnSkipToTrack

func (p *SessionCallbackProxy) OnSkipToTrack(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
	id int64,
) error

func (*SessionCallbackProxy) OnStop

func (p *SessionCallbackProxy) OnStop(
	ctx context.Context,
	packageName string,
	pid int32,
	uid int32,
) error

type SessionCallbackStub

type SessionCallbackStub struct {
	Impl      ISessionCallback
	Transport binder.VersionAwareTransport
}

SessionCallbackStub dispatches incoming binder transactions to a typed ISessionCallback implementation.

func (*SessionCallbackStub) Descriptor

func (s *SessionCallbackStub) Descriptor() string

func (*SessionCallbackStub) OnTransaction

func (s *SessionCallbackStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type SessionControllerCallbackProxy

type SessionControllerCallbackProxy struct {
	Remote binder.IBinder
}

func NewSessionControllerCallbackProxy

func NewSessionControllerCallbackProxy(
	remote binder.IBinder,
) *SessionControllerCallbackProxy

func (*SessionControllerCallbackProxy) AsBinder

func (*SessionControllerCallbackProxy) OnEvent

func (p *SessionControllerCallbackProxy) OnEvent(
	ctx context.Context,
	event string,
	extras os.Bundle,
) error

func (*SessionControllerCallbackProxy) OnExtrasChanged

func (p *SessionControllerCallbackProxy) OnExtrasChanged(
	ctx context.Context,
	extras os.Bundle,
) error

func (*SessionControllerCallbackProxy) OnMetadataChanged

func (p *SessionControllerCallbackProxy) OnMetadataChanged(
	ctx context.Context,
	metadata types.MediaMetadata,
) error

func (*SessionControllerCallbackProxy) OnPlaybackStateChanged

func (p *SessionControllerCallbackProxy) OnPlaybackStateChanged(
	ctx context.Context,
	state PlaybackState,
) error

func (*SessionControllerCallbackProxy) OnQueueChanged

func (*SessionControllerCallbackProxy) OnQueueTitleChanged

func (p *SessionControllerCallbackProxy) OnQueueTitleChanged(
	ctx context.Context,
	title string,
) error

func (*SessionControllerCallbackProxy) OnSessionDestroyed

func (p *SessionControllerCallbackProxy) OnSessionDestroyed(
	ctx context.Context,
) error

func (*SessionControllerCallbackProxy) OnVolumeInfoChanged

type SessionControllerCallbackStub

type SessionControllerCallbackStub struct {
	Impl      ISessionControllerCallback
	Transport binder.VersionAwareTransport
}

SessionControllerCallbackStub dispatches incoming binder transactions to a typed ISessionControllerCallback implementation.

func (*SessionControllerCallbackStub) Descriptor

func (s *SessionControllerCallbackStub) Descriptor() string

func (*SessionControllerCallbackStub) OnTransaction

type SessionControllerProxy

type SessionControllerProxy struct {
	Remote binder.IBinder
}

func NewSessionControllerProxy

func NewSessionControllerProxy(
	remote binder.IBinder,
) *SessionControllerProxy

func (*SessionControllerProxy) AdjustVolume

func (p *SessionControllerProxy) AdjustVolume(
	ctx context.Context,
	packageName string,
	direction int32,
	flags int32,
) error

func (*SessionControllerProxy) AsBinder

func (p *SessionControllerProxy) AsBinder() binder.IBinder

func (*SessionControllerProxy) FastForward

func (p *SessionControllerProxy) FastForward(
	ctx context.Context,
	packageName string,
) error

func (*SessionControllerProxy) GetExtras

func (p *SessionControllerProxy) GetExtras(
	ctx context.Context,
) (os.Bundle, error)

func (*SessionControllerProxy) GetFlags

func (p *SessionControllerProxy) GetFlags(
	ctx context.Context,
) (int64, error)

func (*SessionControllerProxy) GetLaunchPendingIntent

func (p *SessionControllerProxy) GetLaunchPendingIntent(
	ctx context.Context,
) (types.PendingIntent, error)

func (*SessionControllerProxy) GetMetadata

func (*SessionControllerProxy) GetPackageName

func (p *SessionControllerProxy) GetPackageName(
	ctx context.Context,
) (string, error)

func (*SessionControllerProxy) GetPlaybackState

func (p *SessionControllerProxy) GetPlaybackState(
	ctx context.Context,
) (PlaybackState, error)

func (*SessionControllerProxy) GetQueue

func (*SessionControllerProxy) GetQueueTitle

func (p *SessionControllerProxy) GetQueueTitle(
	ctx context.Context,
) (string, error)

func (*SessionControllerProxy) GetRatingType

func (p *SessionControllerProxy) GetRatingType(
	ctx context.Context,
) (int32, error)

func (*SessionControllerProxy) GetSessionInfo

func (p *SessionControllerProxy) GetSessionInfo(
	ctx context.Context,
) (os.Bundle, error)

func (*SessionControllerProxy) GetTag

func (p *SessionControllerProxy) GetTag(
	ctx context.Context,
) (string, error)

func (*SessionControllerProxy) GetVolumeAttributes

func (p *SessionControllerProxy) GetVolumeAttributes(
	ctx context.Context,
) (MediaControllerPlaybackInfo, error)

func (*SessionControllerProxy) Next

func (p *SessionControllerProxy) Next(
	ctx context.Context,
	packageName string,
) error

func (*SessionControllerProxy) Pause

func (p *SessionControllerProxy) Pause(
	ctx context.Context,
	packageName string,
) error

func (*SessionControllerProxy) Play

func (p *SessionControllerProxy) Play(
	ctx context.Context,
	packageName string,
) error

func (*SessionControllerProxy) PlayFromMediaId

func (p *SessionControllerProxy) PlayFromMediaId(
	ctx context.Context,
	packageName string,
	mediaId string,
	extras os.Bundle,
) error

func (*SessionControllerProxy) PlayFromSearch

func (p *SessionControllerProxy) PlayFromSearch(
	ctx context.Context,
	packageName string,
	string_ string,
	extras os.Bundle,
) error

func (*SessionControllerProxy) PlayFromUri

func (p *SessionControllerProxy) PlayFromUri(
	ctx context.Context,
	packageName string,
	uri net.Uri,
	extras os.Bundle,
) error

func (*SessionControllerProxy) Prepare

func (p *SessionControllerProxy) Prepare(
	ctx context.Context,
	packageName string,
) error

func (*SessionControllerProxy) PrepareFromMediaId

func (p *SessionControllerProxy) PrepareFromMediaId(
	ctx context.Context,
	packageName string,
	mediaId string,
	extras os.Bundle,
) error

func (*SessionControllerProxy) PrepareFromSearch

func (p *SessionControllerProxy) PrepareFromSearch(
	ctx context.Context,
	packageName string,
	string_ string,
	extras os.Bundle,
) error

func (*SessionControllerProxy) PrepareFromUri

func (p *SessionControllerProxy) PrepareFromUri(
	ctx context.Context,
	packageName string,
	uri net.Uri,
	extras os.Bundle,
) error

func (*SessionControllerProxy) Previous

func (p *SessionControllerProxy) Previous(
	ctx context.Context,
	packageName string,
) error

func (*SessionControllerProxy) Rate

func (p *SessionControllerProxy) Rate(
	ctx context.Context,
	packageName string,
	rating mediaTypes.Rating,
) error

func (*SessionControllerProxy) RegisterCallback

func (p *SessionControllerProxy) RegisterCallback(
	ctx context.Context,
	packageName string,
	cb ISessionControllerCallback,
) error

func (*SessionControllerProxy) Rewind

func (p *SessionControllerProxy) Rewind(
	ctx context.Context,
	packageName string,
) error

func (*SessionControllerProxy) SeekTo

func (p *SessionControllerProxy) SeekTo(
	ctx context.Context,
	packageName string,
	pos int64,
) error

func (*SessionControllerProxy) SendCommand

func (p *SessionControllerProxy) SendCommand(
	ctx context.Context,
	packageName string,
	command string,
	args os.Bundle,
	cb os.ResultReceiver,
) error

func (*SessionControllerProxy) SendCustomAction

func (p *SessionControllerProxy) SendCustomAction(
	ctx context.Context,
	packageName string,
	action string,
	args os.Bundle,
) error

func (*SessionControllerProxy) SendMediaButton

func (p *SessionControllerProxy) SendMediaButton(
	ctx context.Context,
	packageName string,
	mediaButton view.KeyEvent,
) (bool, error)

func (*SessionControllerProxy) SetPlaybackSpeed

func (p *SessionControllerProxy) SetPlaybackSpeed(
	ctx context.Context,
	packageName string,
	speed float32,
) error

func (*SessionControllerProxy) SetVolumeTo

func (p *SessionControllerProxy) SetVolumeTo(
	ctx context.Context,
	packageName string,
	value int32,
	flags int32,
) error

func (*SessionControllerProxy) SkipToQueueItem

func (p *SessionControllerProxy) SkipToQueueItem(
	ctx context.Context,
	packageName string,
	id int64,
) error

func (*SessionControllerProxy) Stop

func (p *SessionControllerProxy) Stop(
	ctx context.Context,
	packageName string,
) error

func (*SessionControllerProxy) UnregisterCallback

func (p *SessionControllerProxy) UnregisterCallback(
	ctx context.Context,
	cb ISessionControllerCallback,
) error

type SessionControllerStub

type SessionControllerStub struct {
	Impl      ISessionController
	Transport binder.VersionAwareTransport
}

SessionControllerStub dispatches incoming binder transactions to a typed ISessionController implementation.

func (*SessionControllerStub) Descriptor

func (s *SessionControllerStub) Descriptor() string

func (*SessionControllerStub) OnTransaction

func (s *SessionControllerStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type SessionManagerProxy

type SessionManagerProxy struct {
	Remote binder.IBinder
}

func NewSessionManagerProxy

func NewSessionManagerProxy(
	remote binder.IBinder,
) *SessionManagerProxy

func (*SessionManagerProxy) AddOnMediaKeyEventDispatchedListener

func (p *SessionManagerProxy) AddOnMediaKeyEventDispatchedListener(
	ctx context.Context,
	listener IOnMediaKeyEventDispatchedListener,
) error

func (*SessionManagerProxy) AddOnMediaKeyEventSessionChangedListener

func (p *SessionManagerProxy) AddOnMediaKeyEventSessionChangedListener(
	ctx context.Context,
	listener IOnMediaKeyEventSessionChangedListener,
	packageName string,
) error

func (*SessionManagerProxy) AddSession2TokensListener

func (p *SessionManagerProxy) AddSession2TokensListener(
	ctx context.Context,
	listener ISession2TokensListener,
) error

func (*SessionManagerProxy) AddSessionsListener

func (p *SessionManagerProxy) AddSessionsListener(
	ctx context.Context,
	listener IActiveSessionsListener,
	compName content.ComponentName,
) error

func (*SessionManagerProxy) AsBinder

func (p *SessionManagerProxy) AsBinder() binder.IBinder

func (*SessionManagerProxy) CreateSession

func (p *SessionManagerProxy) CreateSession(
	ctx context.Context,
	packageName string,
	sessionCb ISessionCallback,
	tag string,
	sessionInfo os.Bundle,
) (ISession, error)

func (*SessionManagerProxy) DispatchAdjustVolume

func (p *SessionManagerProxy) DispatchAdjustVolume(
	ctx context.Context,
	packageName string,
	suggestedStream int32,
	delta int32,
	flags int32,
) error

func (*SessionManagerProxy) DispatchMediaKeyEvent

func (p *SessionManagerProxy) DispatchMediaKeyEvent(
	ctx context.Context,
	packageName string,
	asSystemService bool,
	keyEvent view.KeyEvent,
	needWakeLock bool,
) error

func (*SessionManagerProxy) DispatchMediaKeyEventToSessionAsSystemService

func (p *SessionManagerProxy) DispatchMediaKeyEventToSessionAsSystemService(
	ctx context.Context,
	packageName string,
	keyEvent view.KeyEvent,
	sessionToken MediaSessionToken,
) (bool, error)

func (*SessionManagerProxy) DispatchVolumeKeyEvent

func (p *SessionManagerProxy) DispatchVolumeKeyEvent(
	ctx context.Context,
	packageName string,
	asSystemService bool,
	keyEvent view.KeyEvent,
	stream int32,
	musicOnly bool,
) error

func (*SessionManagerProxy) DispatchVolumeKeyEventToSessionAsSystemService

func (p *SessionManagerProxy) DispatchVolumeKeyEventToSessionAsSystemService(
	ctx context.Context,
	packageName string,
	keyEvent view.KeyEvent,
	sessionToken MediaSessionToken,
) error

func (*SessionManagerProxy) GetMediaKeyEventSession

func (p *SessionManagerProxy) GetMediaKeyEventSession(
	ctx context.Context,
	packageName string,
) (MediaSessionToken, error)

func (*SessionManagerProxy) GetMediaKeyEventSessionPackageName

func (p *SessionManagerProxy) GetMediaKeyEventSessionPackageName(
	ctx context.Context,
	packageName string,
) (string, error)

func (*SessionManagerProxy) GetSessionPolicies

func (p *SessionManagerProxy) GetSessionPolicies(
	ctx context.Context,
	token MediaSessionToken,
) (int32, error)

func (*SessionManagerProxy) GetSessions

func (p *SessionManagerProxy) GetSessions(
	ctx context.Context,
	compName content.ComponentName,
) ([]MediaSessionToken, error)

func (*SessionManagerProxy) HasCustomMediaKeyDispatcher

func (p *SessionManagerProxy) HasCustomMediaKeyDispatcher(
	ctx context.Context,
	componentName string,
) (bool, error)

func (*SessionManagerProxy) HasCustomMediaSessionPolicyProvider

func (p *SessionManagerProxy) HasCustomMediaSessionPolicyProvider(
	ctx context.Context,
	componentName string,
) (bool, error)

func (*SessionManagerProxy) IsGlobalPriorityActive

func (p *SessionManagerProxy) IsGlobalPriorityActive(
	ctx context.Context,
) (bool, error)

func (*SessionManagerProxy) IsTrusted

func (p *SessionManagerProxy) IsTrusted(
	ctx context.Context,
	controllerPackageName string,
	controllerPid int32,
	controllerUid int32,
) (bool, error)

func (*SessionManagerProxy) RegisterRemoteSessionCallback

func (p *SessionManagerProxy) RegisterRemoteSessionCallback(
	ctx context.Context,
	rvc types.IRemoteSessionCallback,
) error

func (*SessionManagerProxy) RemoveOnMediaKeyEventDispatchedListener

func (p *SessionManagerProxy) RemoveOnMediaKeyEventDispatchedListener(
	ctx context.Context,
	listener IOnMediaKeyEventDispatchedListener,
) error

func (*SessionManagerProxy) RemoveOnMediaKeyEventSessionChangedListener

func (p *SessionManagerProxy) RemoveOnMediaKeyEventSessionChangedListener(
	ctx context.Context,
	listener IOnMediaKeyEventSessionChangedListener,
) error

func (*SessionManagerProxy) RemoveSession2TokensListener

func (p *SessionManagerProxy) RemoveSession2TokensListener(
	ctx context.Context,
	listener ISession2TokensListener,
) error

func (*SessionManagerProxy) RemoveSessionsListener

func (p *SessionManagerProxy) RemoveSessionsListener(
	ctx context.Context,
	listener IActiveSessionsListener,
) error

func (*SessionManagerProxy) SetCustomMediaKeyDispatcher

func (p *SessionManagerProxy) SetCustomMediaKeyDispatcher(
	ctx context.Context,
	name string,
) error

func (*SessionManagerProxy) SetCustomMediaSessionPolicyProvider

func (p *SessionManagerProxy) SetCustomMediaSessionPolicyProvider(
	ctx context.Context,
	name string,
) error

func (*SessionManagerProxy) SetOnMediaKeyListener

func (p *SessionManagerProxy) SetOnMediaKeyListener(
	ctx context.Context,
	listener IOnMediaKeyListener,
) error

func (*SessionManagerProxy) SetOnVolumeKeyLongPressListener

func (p *SessionManagerProxy) SetOnVolumeKeyLongPressListener(
	ctx context.Context,
	listener IOnVolumeKeyLongPressListener,
) error

func (*SessionManagerProxy) SetSessionPolicies

func (p *SessionManagerProxy) SetSessionPolicies(
	ctx context.Context,
	token MediaSessionToken,
	policies int32,
) error

func (*SessionManagerProxy) UnregisterRemoteSessionCallback

func (p *SessionManagerProxy) UnregisterRemoteSessionCallback(
	ctx context.Context,
	rvc types.IRemoteSessionCallback,
) error

type SessionManagerStub

type SessionManagerStub struct {
	Impl      ISessionManager
	Transport binder.VersionAwareTransport
}

SessionManagerStub dispatches incoming binder transactions to a typed ISessionManager implementation.

func (*SessionManagerStub) Descriptor

func (s *SessionManagerStub) Descriptor() string

func (*SessionManagerStub) OnTransaction

func (s *SessionManagerStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type SessionProxy

type SessionProxy struct {
	Remote binder.IBinder
}

func NewSessionProxy

func NewSessionProxy(
	remote binder.IBinder,
) *SessionProxy

func (*SessionProxy) AsBinder

func (p *SessionProxy) AsBinder() binder.IBinder

func (*SessionProxy) DestroySession

func (p *SessionProxy) DestroySession(
	ctx context.Context,
) error

func (*SessionProxy) GetBinderForSetQueue

func (p *SessionProxy) GetBinderForSetQueue(
	ctx context.Context,
) (binder.IBinder, error)

func (*SessionProxy) GetController

func (p *SessionProxy) GetController(
	ctx context.Context,
) (ISessionController, error)

func (*SessionProxy) ResetQueue

func (p *SessionProxy) ResetQueue(
	ctx context.Context,
) error

func (*SessionProxy) SendEvent

func (p *SessionProxy) SendEvent(
	ctx context.Context,
	event string,
	data os.Bundle,
) error

func (*SessionProxy) SetActive

func (p *SessionProxy) SetActive(
	ctx context.Context,
	active bool,
) error

func (*SessionProxy) SetCurrentVolume

func (p *SessionProxy) SetCurrentVolume(
	ctx context.Context,
	currentVolume int32,
) error

func (*SessionProxy) SetExtras

func (p *SessionProxy) SetExtras(
	ctx context.Context,
	extras os.Bundle,
) error

func (*SessionProxy) SetFlags

func (p *SessionProxy) SetFlags(
	ctx context.Context,
	flags int32,
) error

func (*SessionProxy) SetLaunchPendingIntent

func (p *SessionProxy) SetLaunchPendingIntent(
	ctx context.Context,
	pi types.PendingIntent,
) error

func (*SessionProxy) SetMediaButtonBroadcastReceiver

func (p *SessionProxy) SetMediaButtonBroadcastReceiver(
	ctx context.Context,
	broadcastReceiver content.ComponentName,
) error

func (*SessionProxy) SetMediaButtonReceiver

func (p *SessionProxy) SetMediaButtonReceiver(
	ctx context.Context,
	mbr types.PendingIntent,
) error

func (*SessionProxy) SetMetadata

func (p *SessionProxy) SetMetadata(
	ctx context.Context,
	metadata mediaTypes.MediaMetadata,
	duration int64,
	metadataDescription string,
) error

func (*SessionProxy) SetPlaybackState

func (p *SessionProxy) SetPlaybackState(
	ctx context.Context,
	state PlaybackState,
) error

func (*SessionProxy) SetPlaybackToLocal

func (p *SessionProxy) SetPlaybackToLocal(
	ctx context.Context,
	attributes mediaTypes.AudioAttributes,
) error

func (*SessionProxy) SetPlaybackToRemote

func (p *SessionProxy) SetPlaybackToRemote(
	ctx context.Context,
	control int32,
	max_ int32,
	controlId string,
) error

func (*SessionProxy) SetQueueTitle

func (p *SessionProxy) SetQueueTitle(
	ctx context.Context,
	title string,
) error

func (*SessionProxy) SetRatingType

func (p *SessionProxy) SetRatingType(
	ctx context.Context,
	type_ int32,
) error

type SessionStub

type SessionStub struct {
	Impl      ISession
	Transport binder.VersionAwareTransport
}

SessionStub dispatches incoming binder transactions to a typed ISession implementation.

func (*SessionStub) Descriptor

func (s *SessionStub) Descriptor() string

func (*SessionStub) OnTransaction

func (s *SessionStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL