Methods Summary |
---|
public void | abort()Instructs this {@code RemoteConnection} to abort.
try {
if (mConnected) {
mConnectionService.abort(mConnectionId);
}
} catch (RemoteException ignored) {
}
|
public void | answer()Instructs this {@link Connection#STATE_RINGING} {@code RemoteConnection} to answer.
try {
if (mConnected) {
mConnectionService.answer(mConnectionId);
}
} catch (RemoteException ignored) {
}
|
public void | answer(int videoState)Instructs this {@link Connection#STATE_RINGING} {@code RemoteConnection} to answer.
try {
if (mConnected) {
mConnectionService.answerVideo(mConnectionId, videoState);
}
} catch (RemoteException ignored) {
}
|
public void | disconnect()Instructs this {@code RemoteConnection} to disconnect.
try {
if (mConnected) {
mConnectionService.disconnect(mConnectionId);
}
} catch (RemoteException ignored) {
}
|
public static android.telecom.RemoteConnection | failure(DisconnectCause disconnectCause)Create a RemoteConnection represents a failure, and which will be in
{@link Connection#STATE_DISCONNECTED}. Attempting to use it for anything will almost
certainly result in bad things happening. Do not do this.
return new RemoteConnection(disconnectCause);
|
public android.net.Uri | getAddress()Obtains the address of this {@code RemoteConnection}.
return mAddress;
|
public int | getAddressPresentation()Obtains the presentation requirements for the address of this {@code RemoteConnection}.
return mAddressPresentation;
|
public java.lang.CharSequence | getCallerDisplayName()Obtains the display name for this {@code RemoteConnection}'s caller.
return mCallerDisplayName;
|
public int | getCallerDisplayNamePresentation()Obtains the presentation requirements for this {@code RemoteConnection}'s
caller's display name.
return mCallerDisplayNamePresentation;
|
public RemoteConference | getConference()Obtain the {@code RemoteConference} that this {@code RemoteConnection} may be a part
of, or {@code null} if there is no such {@code RemoteConference}.
return mConference;
|
public java.util.List | getConferenceableConnections()Obtain the {@code RemoteConnection}s with which this {@code RemoteConnection} may be
successfully asked to create a conference with.
return mUnmodifiableconferenceableConnections;
|
public int | getConnectionCapabilities()Obtains the capabilities of this {@code RemoteConnection}.
return mConnectionCapabilities;
|
com.android.internal.telecom.IConnectionService | getConnectionService(){@hide}
return mConnectionService;
|
public DisconnectCause | getDisconnectCause()Obtains the reason why this {@code RemoteConnection} may have been disconnected.
return mDisconnectCause;
|
java.lang.String | getId(){@hide}
return mConnectionId;
|
public int | getState()Obtains the state of this {@code RemoteConnection}.
return mState;
|
public StatusHints | getStatusHints()Obtains status hints pertaining to this {@code RemoteConnection}.
return mStatusHints;
|
public final android.telecom.RemoteConnection$VideoProvider | getVideoProvider()Obtains the video provider of this {@code RemoteConnection}.
return mVideoProvider;
|
public int | getVideoState()Obtains the video state of this {@code RemoteConnection}.
return mVideoState;
|
public void | hold()Instructs this {@code RemoteConnection} to go on hold.
try {
if (mConnected) {
mConnectionService.hold(mConnectionId);
}
} catch (RemoteException ignored) {
}
|
public boolean | isRingbackRequested()Determines whether this {@code RemoteConnection} is requesting ringback.
return false;
|
public boolean | isVoipAudioMode()Determines if the audio mode of this {@code RemoteConnection} is VOIP.
return mIsVoipAudioMode;
|
void | onPostDialChar(char nextChar)
for (Callback c : mCallbacks) {
c.onPostDialChar(this, nextChar);
}
|
public void | playDtmfTone(char digit)Instructs this {@code RemoteConnection} to play a dual-tone multi-frequency signaling
(DTMF) tone.
Any other currently playing DTMF tone in the specified call is immediately stopped.
try {
if (mConnected) {
mConnectionService.playDtmfTone(mConnectionId, digit);
}
} catch (RemoteException ignored) {
}
|
public void | postDialContinue(boolean proceed)Instructs this {@code RemoteConnection} to continue playing a post-dial DTMF string.
A post-dial DTMF string is a string of digits following the first instance of either
{@link TelecomManager#DTMF_CHARACTER_WAIT} or {@link TelecomManager#DTMF_CHARACTER_PAUSE}.
These digits are immediately sent as DTMF tones to the recipient as soon as the
connection is made.
If the DTMF string contains a {@link TelecomManager#DTMF_CHARACTER_PAUSE} symbol, this
{@code RemoteConnection} will temporarily pause playing the tones for a pre-defined period
of time.
If the DTMF string contains a {@link TelecomManager#DTMF_CHARACTER_WAIT} symbol, this
{@code RemoteConnection} will pause playing the tones and notify callbacks via
{@link Callback#onPostDialWait(RemoteConnection, String)}. At this point, the in-call app
should display to the user an indication of this state and an affordance to continue
the postdial sequence. When the user decides to continue the postdial sequence, the in-call
app should invoke the {@link #postDialContinue(boolean)} method.
try {
if (mConnected) {
mConnectionService.onPostDialContinue(mConnectionId, proceed);
}
} catch (RemoteException ignored) {
}
|
public void | registerCallback(android.telecom.RemoteConnection$Callback callback)Adds a callback to this {@code RemoteConnection}.
mCallbacks.add(callback);
|
public void | reject()Instructs this {@link Connection#STATE_RINGING} {@code RemoteConnection} to reject.
try {
if (mConnected) {
mConnectionService.reject(mConnectionId);
}
} catch (RemoteException ignored) {
}
|
void | setAddress(android.net.Uri address, int presentation)
mAddress = address;
mAddressPresentation = presentation;
for (Callback c : mCallbacks) {
c.onAddressChanged(this, address, presentation);
}
|
public void | setAudioState(AudioState state)Set the audio state of this {@code RemoteConnection}.
try {
if (mConnected) {
mConnectionService.onAudioStateChanged(mConnectionId, state);
}
} catch (RemoteException ignored) {
}
|
void | setCallerDisplayName(java.lang.String callerDisplayName, int presentation)
mCallerDisplayName = callerDisplayName;
mCallerDisplayNamePresentation = presentation;
for (Callback c : mCallbacks) {
c.onCallerDisplayNameChanged(this, callerDisplayName, presentation);
}
|
void | setConference(RemoteConference conference)
if (mConference != conference) {
mConference = conference;
for (Callback c : mCallbacks) {
c.onConferenceChanged(this, conference);
}
}
|
void | setConferenceableConnections(java.util.List conferenceableConnections)
mConferenceableConnections.clear();
mConferenceableConnections.addAll(conferenceableConnections);
for (Callback c : mCallbacks) {
c.onConferenceableConnectionsChanged(this, mUnmodifiableconferenceableConnections);
}
|
void | setConnectionCapabilities(int connectionCapabilities)
mConnectionCapabilities = connectionCapabilities;
for (Callback c : mCallbacks) {
c.onConnectionCapabilitiesChanged(this, connectionCapabilities);
c.onCallCapabilitiesChanged(this, connectionCapabilities);
}
|
void | setDestroyed()
if (!mCallbacks.isEmpty()) {
// Make sure that the callbacks are notified that the call is destroyed first.
if (mState != Connection.STATE_DISCONNECTED) {
setDisconnected(
new DisconnectCause(DisconnectCause.ERROR, "Connection destroyed."));
}
for (Callback c : mCallbacks) {
c.onDestroyed(this);
}
mCallbacks.clear();
mConnected = false;
}
|
void | setDisconnected(DisconnectCause disconnectCause)
if (mState != Connection.STATE_DISCONNECTED) {
mState = Connection.STATE_DISCONNECTED;
mDisconnectCause = disconnectCause;
for (Callback c : mCallbacks) {
c.onDisconnected(this, mDisconnectCause);
}
}
|
void | setIsVoipAudioMode(boolean isVoip)
mIsVoipAudioMode = isVoip;
for (Callback c : mCallbacks) {
c.onVoipAudioChanged(this, isVoip);
}
|
void | setPostDialWait(java.lang.String remainingDigits)
for (Callback c : mCallbacks) {
c.onPostDialWait(this, remainingDigits);
}
|
void | setRingbackRequested(boolean ringback)
if (mRingbackRequested != ringback) {
mRingbackRequested = ringback;
for (Callback c : mCallbacks) {
c.onRingbackRequested(this, ringback);
}
}
|
void | setState(int state)
if (mState != state) {
mState = state;
for (Callback c: mCallbacks) {
c.onStateChanged(this, state);
}
}
|
void | setStatusHints(StatusHints statusHints)
mStatusHints = statusHints;
for (Callback c : mCallbacks) {
c.onStatusHintsChanged(this, statusHints);
}
|
void | setVideoProvider(android.telecom.RemoteConnection$VideoProvider videoProvider)
mVideoProvider = videoProvider;
for (Callback c : mCallbacks) {
c.onVideoProviderChanged(this, videoProvider);
}
|
void | setVideoState(int videoState)
mVideoState = videoState;
for (Callback c : mCallbacks) {
c.onVideoStateChanged(this, videoState);
}
|
public void | stopDtmfTone()Instructs this {@code RemoteConnection} to stop any dual-tone multi-frequency signaling
(DTMF) tone currently playing.
DTMF tones are played by calling {@link #playDtmfTone(char)}. If no DTMF tone is
currently playing, this method will do nothing.
try {
if (mConnected) {
mConnectionService.stopDtmfTone(mConnectionId);
}
} catch (RemoteException ignored) {
}
|
public void | unhold()Instructs this {@link Connection#STATE_HOLDING} call to release from hold.
try {
if (mConnected) {
mConnectionService.unhold(mConnectionId);
}
} catch (RemoteException ignored) {
}
|
public void | unregisterCallback(android.telecom.RemoteConnection$Callback callback)Removes a callback from this {@code RemoteConnection}.
if (callback != null) {
mCallbacks.remove(callback);
}
|