prediction

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: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIPredictionManagerCreatePredictionSession     = binder.FirstCallTransaction + 0
	TransactionIPredictionManagerNotifyAppTargetEvent        = binder.FirstCallTransaction + 1
	TransactionIPredictionManagerNotifyLaunchLocationShown   = binder.FirstCallTransaction + 2
	TransactionIPredictionManagerSortAppTargets              = binder.FirstCallTransaction + 3
	TransactionIPredictionManagerRegisterPredictionUpdates   = binder.FirstCallTransaction + 4
	TransactionIPredictionManagerUnregisterPredictionUpdates = binder.FirstCallTransaction + 5
	TransactionIPredictionManagerRequestPredictionUpdate     = binder.FirstCallTransaction + 6
	TransactionIPredictionManagerOnDestroyPredictionSession  = binder.FirstCallTransaction + 7
	TransactionIPredictionManagerRequestServiceFeatures      = binder.FirstCallTransaction + 8
)
View Source
const (
	MethodIPredictionManagerCreatePredictionSession     = "createPredictionSession"
	MethodIPredictionManagerNotifyAppTargetEvent        = "notifyAppTargetEvent"
	MethodIPredictionManagerNotifyLaunchLocationShown   = "notifyLaunchLocationShown"
	MethodIPredictionManagerSortAppTargets              = "sortAppTargets"
	MethodIPredictionManagerRegisterPredictionUpdates   = "registerPredictionUpdates"
	MethodIPredictionManagerUnregisterPredictionUpdates = "unregisterPredictionUpdates"
	MethodIPredictionManagerRequestPredictionUpdate     = "requestPredictionUpdate"
	MethodIPredictionManagerOnDestroyPredictionSession  = "onDestroyPredictionSession"
	MethodIPredictionManagerRequestServiceFeatures      = "requestServiceFeatures"
)
View Source
const DescriptorIPredictionCallback = "android.app.prediction.IPredictionCallback"
View Source
const DescriptorIPredictionManager = "android.app.prediction.IPredictionManager"
View Source
const (
	MethodIPredictionCallbackOnResult = "onResult"
)
View Source
const (
	TransactionIPredictionCallbackOnResult = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppPredictionContext

type AppPredictionContext struct {
	UiSurface            string
	PredictedTargetCount int32
	PackageName          string
}

func (*AppPredictionContext) MarshalParcel

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

func (*AppPredictionContext) UnmarshalParcel

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

type AppPredictionSessionId

type AppPredictionSessionId struct {
	Id     string
	UserId int32
}

func (*AppPredictionSessionId) MarshalParcel

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

func (*AppPredictionSessionId) UnmarshalParcel

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

type AppTarget

type AppTarget struct {
	ClassName    string
	Rank         int32
	ShortcutInfo *pm.ShortcutInfo
}

func (*AppTarget) MarshalParcel

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

func (*AppTarget) UnmarshalParcel

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

type AppTargetEvent

type AppTargetEvent struct {
	Location string
	Action   int32
}

func (*AppTargetEvent) MarshalParcel

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

func (*AppTargetEvent) UnmarshalParcel

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

type AppTargetId

type AppTargetId struct {
	Id string
}

func (*AppTargetId) MarshalParcel

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

func (*AppTargetId) UnmarshalParcel

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

type IPredictionCallback

type IPredictionCallback interface {
	AsBinder() binder.IBinder
	OnResult(ctx context.Context, result pm.ParceledListSlice) error
}

func NewPredictionCallbackStub

func NewPredictionCallbackStub(
	impl IPredictionCallbackServer,
) IPredictionCallback

NewPredictionCallbackStub creates a server-side IPredictionCallback wrapping the given server implementation. The returned value satisfies IPredictionCallback 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 IPredictionCallbackServer

type IPredictionCallbackServer interface {
	OnResult(ctx context.Context, result pm.ParceledListSlice) error
}

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

type IPredictionManager

type IPredictionManager interface {
	AsBinder() binder.IBinder
	CreatePredictionSession(ctx context.Context, context_ AppPredictionContext, sessionId AppPredictionSessionId, token binder.IBinder) error
	NotifyAppTargetEvent(ctx context.Context, sessionId AppPredictionSessionId, event AppTargetEvent) error
	NotifyLaunchLocationShown(ctx context.Context, sessionId AppPredictionSessionId, launchLocation string, targetIds pm.ParceledListSlice) error
	SortAppTargets(ctx context.Context, sessionId AppPredictionSessionId, targets pm.ParceledListSlice, callback IPredictionCallback) error
	RegisterPredictionUpdates(ctx context.Context, sessionId AppPredictionSessionId, callback IPredictionCallback) error
	UnregisterPredictionUpdates(ctx context.Context, sessionId AppPredictionSessionId, callback IPredictionCallback) error
	RequestPredictionUpdate(ctx context.Context, sessionId AppPredictionSessionId) error
	OnDestroyPredictionSession(ctx context.Context, sessionId AppPredictionSessionId) error
	RequestServiceFeatures(ctx context.Context, sessionId AppPredictionSessionId, callback os.IRemoteCallback) error
}

func NewPredictionManagerStub

func NewPredictionManagerStub(
	impl IPredictionManagerServer,
) IPredictionManager

NewPredictionManagerStub creates a server-side IPredictionManager wrapping the given server implementation. The returned value satisfies IPredictionManager 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 IPredictionManagerServer

type IPredictionManagerServer interface {
	CreatePredictionSession(ctx context.Context, context_ AppPredictionContext, sessionId AppPredictionSessionId, token binder.IBinder) error
	NotifyAppTargetEvent(ctx context.Context, sessionId AppPredictionSessionId, event AppTargetEvent) error
	NotifyLaunchLocationShown(ctx context.Context, sessionId AppPredictionSessionId, launchLocation string, targetIds pm.ParceledListSlice) error
	SortAppTargets(ctx context.Context, sessionId AppPredictionSessionId, targets pm.ParceledListSlice, callback IPredictionCallback) error
	RegisterPredictionUpdates(ctx context.Context, sessionId AppPredictionSessionId, callback IPredictionCallback) error
	UnregisterPredictionUpdates(ctx context.Context, sessionId AppPredictionSessionId, callback IPredictionCallback) error
	RequestPredictionUpdate(ctx context.Context, sessionId AppPredictionSessionId) error
	OnDestroyPredictionSession(ctx context.Context, sessionId AppPredictionSessionId) error
	RequestServiceFeatures(ctx context.Context, sessionId AppPredictionSessionId, callback os.IRemoteCallback) error
}

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

type PredictionCallbackProxy

type PredictionCallbackProxy struct {
	Remote binder.IBinder
}

func NewPredictionCallbackProxy

func NewPredictionCallbackProxy(
	remote binder.IBinder,
) *PredictionCallbackProxy

func (*PredictionCallbackProxy) AsBinder

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

func (*PredictionCallbackProxy) OnResult

func (p *PredictionCallbackProxy) OnResult(
	ctx context.Context,
	result pm.ParceledListSlice,
) error

type PredictionCallbackStub

type PredictionCallbackStub struct {
	Impl      IPredictionCallback
	Transport binder.VersionAwareTransport
}

PredictionCallbackStub dispatches incoming binder transactions to a typed IPredictionCallback implementation.

func (*PredictionCallbackStub) Descriptor

func (s *PredictionCallbackStub) Descriptor() string

func (*PredictionCallbackStub) OnTransaction

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

type PredictionManagerProxy

type PredictionManagerProxy struct {
	Remote binder.IBinder
}

func NewPredictionManagerProxy

func NewPredictionManagerProxy(
	remote binder.IBinder,
) *PredictionManagerProxy

func (*PredictionManagerProxy) AsBinder

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

func (*PredictionManagerProxy) CreatePredictionSession

func (p *PredictionManagerProxy) CreatePredictionSession(
	ctx context.Context,
	context_ AppPredictionContext,
	sessionId AppPredictionSessionId,
	token binder.IBinder,
) error

func (*PredictionManagerProxy) NotifyAppTargetEvent

func (p *PredictionManagerProxy) NotifyAppTargetEvent(
	ctx context.Context,
	sessionId AppPredictionSessionId,
	event AppTargetEvent,
) error

func (*PredictionManagerProxy) NotifyLaunchLocationShown

func (p *PredictionManagerProxy) NotifyLaunchLocationShown(
	ctx context.Context,
	sessionId AppPredictionSessionId,
	launchLocation string,
	targetIds pm.ParceledListSlice,
) error

func (*PredictionManagerProxy) OnDestroyPredictionSession

func (p *PredictionManagerProxy) OnDestroyPredictionSession(
	ctx context.Context,
	sessionId AppPredictionSessionId,
) error

func (*PredictionManagerProxy) RegisterPredictionUpdates

func (p *PredictionManagerProxy) RegisterPredictionUpdates(
	ctx context.Context,
	sessionId AppPredictionSessionId,
	callback IPredictionCallback,
) error

func (*PredictionManagerProxy) RequestPredictionUpdate

func (p *PredictionManagerProxy) RequestPredictionUpdate(
	ctx context.Context,
	sessionId AppPredictionSessionId,
) error

func (*PredictionManagerProxy) RequestServiceFeatures

func (p *PredictionManagerProxy) RequestServiceFeatures(
	ctx context.Context,
	sessionId AppPredictionSessionId,
	callback os.IRemoteCallback,
) error

func (*PredictionManagerProxy) SortAppTargets

func (p *PredictionManagerProxy) SortAppTargets(
	ctx context.Context,
	sessionId AppPredictionSessionId,
	targets pm.ParceledListSlice,
	callback IPredictionCallback,
) error

func (*PredictionManagerProxy) UnregisterPredictionUpdates

func (p *PredictionManagerProxy) UnregisterPredictionUpdates(
	ctx context.Context,
	sessionId AppPredictionSessionId,
	callback IPredictionCallback,
) error

type PredictionManagerStub

type PredictionManagerStub struct {
	Impl      IPredictionManager
	Transport binder.VersionAwareTransport
}

PredictionManagerStub dispatches incoming binder transactions to a typed IPredictionManager implementation.

func (*PredictionManagerStub) Descriptor

func (s *PredictionManagerStub) Descriptor() string

func (*PredictionManagerStub) OnTransaction

func (s *PredictionManagerStub) 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