public final class

SpeakEasyProtocol

extends Object
java.lang.Object
   ↳ androidx.test.services.speakeasy.SpeakEasyProtocol

Class Overview

SpeakEasyProtocol abstracts away sending commands / interpreting responses from speakeasy via bundles.

SpeakEasy allows the registration, query, removal of IBinders from the shell user to android apps.

This bypasses the Android platform's typical dependency and lifecycle management of Services and IPC. Using Service objects defined in your Android manifest is the proper way to do IPC in Android and these mechanisms should only be used in test.

The dependencies of this class should be kept to a minimum and it should remain possible to use this class outside of an apk.

Summary

Nested Classes
class SpeakEasyProtocol.Find Represents a Find request to SpeakEasy. 
class SpeakEasyProtocol.FindResult The result of a find operation on SpeakEasy. 
class SpeakEasyProtocol.Publish Represents a publish command to speakeasy. 
class SpeakEasyProtocol.PublishResult Represents a publish response from speakeasy. 
class SpeakEasyProtocol.Remove Indicates a request to remove a IBinder from SpeakEasy. 
Constants
int FIND_RESULT_TYPE
int FIND_TYPE
int PUBLISH_RESULT_TYPE
int PUBLISH_TYPE
int REMOVE_TYPE
Fields
public final SpeakEasyProtocol.Find find
public final SpeakEasyProtocol.FindResult findResult
public final SpeakEasyProtocol.Publish publish Set based on type.
public final SpeakEasyProtocol.PublishResult publishResult
public final SpeakEasyProtocol.Remove remove
public final int type
Public Methods
static SpeakEasyProtocol fromBundle(Bundle b)
Decodes a bundle into a SpeakEasyProtocol object.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int FIND_RESULT_TYPE

Constant Value: 4 (0x00000004)

public static final int FIND_TYPE

Constant Value: 3 (0x00000003)

public static final int PUBLISH_RESULT_TYPE

Constant Value: 1 (0x00000001)

public static final int PUBLISH_TYPE

Constant Value: 0 (0x00000000)

public static final int REMOVE_TYPE

Constant Value: 2 (0x00000002)

Fields

public final SpeakEasyProtocol.Find find

public final SpeakEasyProtocol.FindResult findResult

public final SpeakEasyProtocol.Publish publish

Set based on type.

public final SpeakEasyProtocol.PublishResult publishResult

public final SpeakEasyProtocol.Remove remove

public final int type

Public Methods

public static SpeakEasyProtocol fromBundle (Bundle b)

Decodes a bundle into a SpeakEasyProtocol object.

Parameters
b Bundle: a Bundle (nullable)
Returns
SpeakEasyProtocol A SpeakEasyProtocol - or null if invalid.

public String toString ()

Returns
String