InCallService
directly instead of using this class.@Deprecated public final class Phone extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Phone.Listener
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(Phone.Listener listener)
Deprecated.
Adds a listener to this
Phone . |
boolean |
canAddCall()
Deprecated.
Returns if the
Phone can support additional calls. |
AudioState |
getAudioState()
Deprecated.
Use
getCallAudioState() instead. |
CallAudioState |
getCallAudioState()
Deprecated.
Obtains the current phone call audio state of the
Phone . |
List<Call> |
getCalls()
Deprecated.
Obtains the current list of
Call s to be displayed by this in-call experience. |
void |
removeListener(Phone.Listener listener)
Deprecated.
Removes a listener from this
Phone . |
void |
setAudioRoute(int route)
Deprecated.
Sets the audio route (speaker, bluetooth, etc...).
|
void |
setMuted(boolean state)
Deprecated.
Sets the microphone mute state.
|
void |
setProximitySensorOff(boolean screenOnImmediately)
Deprecated.
Turns the proximity sensor off.
|
void |
setProximitySensorOn()
Deprecated.
Turns the proximity sensor on.
|
public final void addListener(Phone.Listener listener)
Phone
.listener
- A Listener
object.public final void removeListener(Phone.Listener listener)
Phone
.listener
- A Listener
object.public final List<Call> getCalls()
Call
s to be displayed by this in-call experience.Call
s.public final boolean canAddCall()
Phone
can support additional calls.public final void setMuted(boolean state)
getAudioState()
.state
- true
if the microphone should be muted; false
otherwise.public final void setAudioRoute(int route)
getAudioState()
.route
- The audio route to use.public final void setProximitySensorOn()
public final void setProximitySensorOff(boolean screenOnImmediately)
screenOnImmediately
- If true, the screen will be turned on immediately if it was
previously off. Otherwise, the screen will only be turned on after the proximity sensor
is no longer triggered.@Deprecated public final AudioState getAudioState()
getCallAudioState()
instead.Phone
.public final CallAudioState getCallAudioState()
Phone
.