Package com.dsi.ant.channel.ipc.aidl
Class AntIpcResult
java.lang.Object
com.dsi.ant.channel.ipc.aidl.AntIpcResult
- All Implemented Interfaces:
android.os.Parcelable
The class is the general return object for the
IAntChannelProviderAidl.handleMessage(android.os.Message, Bundle)
method. It is able to return IBinder objects and a Bundle (which would
contain all other data that is able to be put in a Bundle object) to the
calling process.- Since:
- 4.3
-
Nested Class Summary
Nested classes/interfaces inherited from interface android.os.Parcelable
android.os.Parcelable.ClassLoaderCreator<T>, android.os.Parcelable.Creator<T>
-
Field Summary
FieldsFields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty AntIpcResult object ready to be populated with return data. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBinder
(android.os.IBinder binder) Adds the binder to the binder list that will be returned to the calling process.int
ArrayList<android.os.IBinder>
Get the binder objects returned.android.os.Bundle
Get the bundle object containing the return data/objects returned.void
setBundle
(android.os.Bundle data) Sets the data contained in a bundle that will be returned to the calling process.void
writeToParcel
(android.os.Parcel dest, int flags)
-
Field Details
-
CREATOR
-
-
Constructor Details
-
AntIpcResult
public AntIpcResult()Constructs an empty AntIpcResult object ready to be populated with return data.- Since:
- 4.3
-
-
Method Details
-
setBundle
public void setBundle(android.os.Bundle data) Sets the data contained in a bundle that will be returned to the calling process.- Parameters:
data
- The return data or objects contained within a Bundle.- Since:
- 4.3
-
addBinder
public void addBinder(android.os.IBinder binder) Adds the binder to the binder list that will be returned to the calling process.- Parameters:
binder
- The IBinder object to be returned.- Since:
- 4.3
-
getBundleReturned
public android.os.Bundle getBundleReturned()Get the bundle object containing the return data/objects returned.- Since:
- 4.3
-
getBindersReturned
Get the binder objects returned. When constructing the Binder, follow the same steps as you would to received an IBinder from onServiceConnected() when connecting to a service. For example:
GenerateAidlClass aidlClass = GenerateAidlClass.Stub. asInterface(antIpcResult.getBindersReturned().get(0));
- Since:
- 4.3
-
describeContents
public int describeContents()- Specified by:
describeContents
in interfaceandroid.os.Parcelable
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags) - Specified by:
writeToParcel
in interfaceandroid.os.Parcelable
-