public final class BluetoothHeadsetClientCall extends Object implements Parcelable
Parcelable
for inter-process message passing.Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static int |
CALL_STATE_ACTIVE
Call is active.
|
static int |
CALL_STATE_ALERTING
Outgoing call that remote party has already been alerted about.
|
static int |
CALL_STATE_DIALING
Outgoing call that is being dialed right now.
|
static int |
CALL_STATE_HELD
Call is in held state.
|
static int |
CALL_STATE_HELD_BY_RESPONSE_AND_HOLD
Call that has been held by response and hold
(see Bluetooth specification for further references).
|
static int |
CALL_STATE_INCOMING
Incoming call that can be accepted or rejected.
|
static int |
CALL_STATE_TERMINATED
Call that has been already terminated and should not be referenced as a valid call.
|
static int |
CALL_STATE_WAITING
Waiting call state when there is already an active call.
|
static Parcelable.Creator<BluetoothHeadsetClientCall> |
CREATOR
Parcelable.Creator interface implementation. |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
BluetoothHeadsetClientCall(BluetoothDevice device,
int id,
int state,
String number,
boolean multiParty,
boolean outgoing)
Creates BluetoothHeadsetClientCall instance.
|
BluetoothHeadsetClientCall(BluetoothDevice device,
int id,
UUID uuid,
int state,
String number,
boolean multiParty,
boolean outgoing) |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
BluetoothDevice |
getDevice()
Gets call's device.
|
int |
getId()
Gets call's Id.
|
String |
getNumber()
Gets call's number.
|
int |
getState()
Gets call's current state.
|
UUID |
getUUID()
Gets call's UUID.
|
boolean |
isMultiParty()
Checks if call is an active call in a conference mode (aka multi party).
|
boolean |
isOutgoing()
Checks if this call is an outgoing call.
|
void |
setMultiParty(boolean multiParty)
Sets this call as multi party call.
|
void |
setNumber(String number)
Sets call's number.
|
void |
setState(int state)
Sets call's state.
|
String |
toString()
Returns a string representation of the object.
|
String |
toString(boolean loggable) |
void |
writeToParcel(Parcel out,
int flags)
Flatten this object in to a Parcel.
|
public static final int CALL_STATE_ACTIVE
public static final int CALL_STATE_HELD
public static final int CALL_STATE_DIALING
public static final int CALL_STATE_ALERTING
public static final int CALL_STATE_INCOMING
public static final int CALL_STATE_WAITING
public static final int CALL_STATE_HELD_BY_RESPONSE_AND_HOLD
public static final int CALL_STATE_TERMINATED
public static final Parcelable.Creator<BluetoothHeadsetClientCall> CREATOR
Parcelable.Creator
interface implementation.public BluetoothHeadsetClientCall(BluetoothDevice device, int id, int state, String number, boolean multiParty, boolean outgoing)
public BluetoothHeadsetClientCall(BluetoothDevice device, int id, UUID uuid, int state, String number, boolean multiParty, boolean outgoing)
public void setState(int state)
Note: This is an internal function and shouldn't be exposed
state
- new call state.public void setNumber(String number)
Note: This is an internal function and shouldn't be exposed
number
- String representing phone number.public void setMultiParty(boolean multiParty)
Note: This is an internal function and shouldn't be exposed
multiParty
- if true
sets this call as a part
of multi party conference.public BluetoothDevice getDevice()
public int getId()
public UUID getUUID()
public int getState()
public String getNumber()
public boolean isMultiParty()
true
if call is a multi party call,
false
otherwise.public boolean isOutgoing()
true
if its outgoing call,
false
otherwise.public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
public String toString(boolean loggable)
public void writeToParcel(Parcel out, int flags)
Parcelable
writeToParcel
in interface Parcelable
out
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR