Merge "Un-hide Connection-side RTT APIs for Dialer"
am: d35e81d615
Change-Id: I2da7e7766d131500167f745cc50ae882edc832cf
This commit is contained in:
@@ -39380,6 +39380,7 @@ package android.telecom {
|
|||||||
method public final int getState();
|
method public final int getState();
|
||||||
method public final android.telecom.StatusHints getStatusHints();
|
method public final android.telecom.StatusHints getStatusHints();
|
||||||
method public final android.telecom.Connection.VideoProvider getVideoProvider();
|
method public final android.telecom.Connection.VideoProvider getVideoProvider();
|
||||||
|
method public void handleRttUpgradeResponse(android.telecom.Connection.RttTextStream);
|
||||||
method public final boolean isRingbackRequested();
|
method public final boolean isRingbackRequested();
|
||||||
method public void onAbort();
|
method public void onAbort();
|
||||||
method public void onAnswer(int);
|
method public void onAnswer(int);
|
||||||
@@ -39398,8 +39399,10 @@ package android.telecom {
|
|||||||
method public void onReject(java.lang.String);
|
method public void onReject(java.lang.String);
|
||||||
method public void onSeparate();
|
method public void onSeparate();
|
||||||
method public void onShowIncomingCallUi();
|
method public void onShowIncomingCallUi();
|
||||||
|
method public void onStartRtt(android.telecom.Connection.RttTextStream);
|
||||||
method public void onStateChanged(int);
|
method public void onStateChanged(int);
|
||||||
method public void onStopDtmfTone();
|
method public void onStopDtmfTone();
|
||||||
|
method public void onStopRtt();
|
||||||
method public void onUnhold();
|
method public void onUnhold();
|
||||||
method public static java.lang.String propertiesToString(int);
|
method public static java.lang.String propertiesToString(int);
|
||||||
method public final void putExtras(android.os.Bundle);
|
method public final void putExtras(android.os.Bundle);
|
||||||
@@ -39407,6 +39410,10 @@ package android.telecom {
|
|||||||
method public final void removeExtras(java.lang.String...);
|
method public final void removeExtras(java.lang.String...);
|
||||||
method public void requestBluetoothAudio(java.lang.String);
|
method public void requestBluetoothAudio(java.lang.String);
|
||||||
method public void sendConnectionEvent(java.lang.String, android.os.Bundle);
|
method public void sendConnectionEvent(java.lang.String, android.os.Bundle);
|
||||||
|
method public final void sendRemoteRttRequest();
|
||||||
|
method public final void sendRttInitiationFailure(int);
|
||||||
|
method public final void sendRttInitiationSuccess();
|
||||||
|
method public final void sendRttSessionRemotelyTerminated();
|
||||||
method public final void setActive();
|
method public final void setActive();
|
||||||
method public final void setAddress(android.net.Uri, int);
|
method public final void setAddress(android.net.Uri, int);
|
||||||
method public final void setAudioModeIsVoip(boolean);
|
method public final void setAudioModeIsVoip(boolean);
|
||||||
@@ -39461,6 +39468,7 @@ package android.telecom {
|
|||||||
field public static final java.lang.String EXTRA_LAST_FORWARDED_NUMBER = "android.telecom.extra.LAST_FORWARDED_NUMBER";
|
field public static final java.lang.String EXTRA_LAST_FORWARDED_NUMBER = "android.telecom.extra.LAST_FORWARDED_NUMBER";
|
||||||
field public static final int PROPERTY_HAS_CDMA_VOICE_PRIVACY = 32; // 0x20
|
field public static final int PROPERTY_HAS_CDMA_VOICE_PRIVACY = 32; // 0x20
|
||||||
field public static final int PROPERTY_IS_EXTERNAL_CALL = 16; // 0x10
|
field public static final int PROPERTY_IS_EXTERNAL_CALL = 16; // 0x10
|
||||||
|
field public static final int PROPERTY_IS_RTT = 256; // 0x100
|
||||||
field public static final int PROPERTY_SELF_MANAGED = 128; // 0x80
|
field public static final int PROPERTY_SELF_MANAGED = 128; // 0x80
|
||||||
field public static final int STATE_ACTIVE = 4; // 0x4
|
field public static final int STATE_ACTIVE = 4; // 0x4
|
||||||
field public static final int STATE_DIALING = 3; // 0x3
|
field public static final int STATE_DIALING = 3; // 0x3
|
||||||
@@ -39480,6 +39488,12 @@ package android.telecom {
|
|||||||
field public static final int SESSION_MODIFY_REQUEST_TIMED_OUT = 4; // 0x4
|
field public static final int SESSION_MODIFY_REQUEST_TIMED_OUT = 4; // 0x4
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static final class Connection.RttTextStream {
|
||||||
|
method public java.lang.String read() throws java.io.IOException;
|
||||||
|
method public java.lang.String readImmediately() throws java.io.IOException;
|
||||||
|
method public void write(java.lang.String) throws java.io.IOException;
|
||||||
|
}
|
||||||
|
|
||||||
public static abstract class Connection.VideoProvider {
|
public static abstract class Connection.VideoProvider {
|
||||||
ctor public Connection.VideoProvider();
|
ctor public Connection.VideoProvider();
|
||||||
method public void changeCameraCapabilities(android.telecom.VideoProfile.CameraCapabilities);
|
method public void changeCameraCapabilities(android.telecom.VideoProfile.CameraCapabilities);
|
||||||
@@ -39520,7 +39534,9 @@ package android.telecom {
|
|||||||
method public android.telecom.PhoneAccountHandle getAccountHandle();
|
method public android.telecom.PhoneAccountHandle getAccountHandle();
|
||||||
method public android.net.Uri getAddress();
|
method public android.net.Uri getAddress();
|
||||||
method public android.os.Bundle getExtras();
|
method public android.os.Bundle getExtras();
|
||||||
|
method public android.telecom.Connection.RttTextStream getRttTextStream();
|
||||||
method public int getVideoState();
|
method public int getVideoState();
|
||||||
|
method public boolean isRequestingRtt();
|
||||||
method public void writeToParcel(android.os.Parcel, int);
|
method public void writeToParcel(android.os.Parcel, int);
|
||||||
field public static final android.os.Parcelable.Creator<android.telecom.ConnectionRequest> CREATOR;
|
field public static final android.os.Parcelable.Creator<android.telecom.ConnectionRequest> CREATOR;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -426,32 +426,6 @@ package android.service.quicksettings {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package android.telecom {
|
|
||||||
|
|
||||||
public abstract class Connection extends android.telecom.Conferenceable {
|
|
||||||
method public void handleRttUpgradeResponse(android.telecom.Connection.RttTextStream);
|
|
||||||
method public void onStartRtt(android.telecom.Connection.RttTextStream);
|
|
||||||
method public void onStopRtt();
|
|
||||||
method public final void sendRemoteRttRequest();
|
|
||||||
method public final void sendRttInitiationFailure(int);
|
|
||||||
method public final void sendRttInitiationSuccess();
|
|
||||||
method public final void sendRttSessionRemotelyTerminated();
|
|
||||||
field public static final int PROPERTY_IS_RTT = 256; // 0x100
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final class Connection.RttTextStream {
|
|
||||||
method public java.lang.String read() throws java.io.IOException;
|
|
||||||
method public java.lang.String readImmediately() throws java.io.IOException;
|
|
||||||
method public void write(java.lang.String) throws java.io.IOException;
|
|
||||||
}
|
|
||||||
|
|
||||||
public final class ConnectionRequest implements android.os.Parcelable {
|
|
||||||
method public android.telecom.Connection.RttTextStream getRttTextStream();
|
|
||||||
method public boolean isRequestingRtt();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
package android.telephony {
|
package android.telephony {
|
||||||
|
|
||||||
public class MbmsDownloadSession implements java.lang.AutoCloseable {
|
public class MbmsDownloadSession implements java.lang.AutoCloseable {
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ import com.android.internal.telecom.IVideoProvider;
|
|||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
import android.annotation.Nullable;
|
import android.annotation.Nullable;
|
||||||
import android.annotation.SystemApi;
|
import android.annotation.SystemApi;
|
||||||
import android.annotation.TestApi;
|
|
||||||
import android.app.Notification;
|
import android.app.Notification;
|
||||||
import android.bluetooth.BluetoothDevice;
|
import android.bluetooth.BluetoothDevice;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@@ -400,9 +399,7 @@ public abstract class Connection extends Conferenceable {
|
|||||||
/**
|
/**
|
||||||
* Set by the framework to indicate that a connection has an active RTT session associated with
|
* Set by the framework to indicate that a connection has an active RTT session associated with
|
||||||
* it.
|
* it.
|
||||||
* @hide
|
|
||||||
*/
|
*/
|
||||||
@TestApi
|
|
||||||
public static final int PROPERTY_IS_RTT = 1 << 8;
|
public static final int PROPERTY_IS_RTT = 1 << 8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -847,9 +844,7 @@ public abstract class Connection extends Conferenceable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides methods to read and write RTT data to/from the in-call app.
|
* Provides methods to read and write RTT data to/from the in-call app.
|
||||||
* @hide
|
|
||||||
*/
|
*/
|
||||||
@TestApi
|
|
||||||
public static final class RttTextStream {
|
public static final class RttTextStream {
|
||||||
private static final int READ_BUFFER_SIZE = 1000;
|
private static final int READ_BUFFER_SIZE = 1000;
|
||||||
private final InputStreamReader mPipeFromInCall;
|
private final InputStreamReader mPipeFromInCall;
|
||||||
@@ -2622,10 +2617,8 @@ public abstract class Connection extends Conferenceable {
|
|||||||
/**
|
/**
|
||||||
* Informs listeners that a previously requested RTT session via
|
* Informs listeners that a previously requested RTT session via
|
||||||
* {@link ConnectionRequest#isRequestingRtt()} or
|
* {@link ConnectionRequest#isRequestingRtt()} or
|
||||||
* {@link #onStartRtt(ParcelFileDescriptor, ParcelFileDescriptor)} has succeeded.
|
* {@link #onStartRtt(RttTextStream)} has succeeded.
|
||||||
* @hide
|
|
||||||
*/
|
*/
|
||||||
@TestApi
|
|
||||||
public final void sendRttInitiationSuccess() {
|
public final void sendRttInitiationSuccess() {
|
||||||
setRttProperty();
|
setRttProperty();
|
||||||
mListeners.forEach((l) -> l.onRttInitiationSuccess(Connection.this));
|
mListeners.forEach((l) -> l.onRttInitiationSuccess(Connection.this));
|
||||||
@@ -2633,14 +2626,11 @@ public abstract class Connection extends Conferenceable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Informs listeners that a previously requested RTT session via
|
* Informs listeners that a previously requested RTT session via
|
||||||
* {@link ConnectionRequest#isRequestingRtt()} or
|
* {@link ConnectionRequest#isRequestingRtt()} or {@link #onStartRtt(RttTextStream)}
|
||||||
* {@link #onStartRtt(ParcelFileDescriptor, ParcelFileDescriptor)}
|
|
||||||
* has failed.
|
* has failed.
|
||||||
* @param reason One of the reason codes defined in {@link RttModifyStatus}, with the
|
* @param reason One of the reason codes defined in {@link RttModifyStatus}, with the
|
||||||
* exception of {@link RttModifyStatus#SESSION_MODIFY_REQUEST_SUCCESS}.
|
* exception of {@link RttModifyStatus#SESSION_MODIFY_REQUEST_SUCCESS}.
|
||||||
* @hide
|
|
||||||
*/
|
*/
|
||||||
@TestApi
|
|
||||||
public final void sendRttInitiationFailure(int reason) {
|
public final void sendRttInitiationFailure(int reason) {
|
||||||
unsetRttProperty();
|
unsetRttProperty();
|
||||||
mListeners.forEach((l) -> l.onRttInitiationFailure(Connection.this, reason));
|
mListeners.forEach((l) -> l.onRttInitiationFailure(Connection.this, reason));
|
||||||
@@ -2649,9 +2639,7 @@ public abstract class Connection extends Conferenceable {
|
|||||||
/**
|
/**
|
||||||
* Informs listeners that a currently active RTT session has been terminated by the remote
|
* Informs listeners that a currently active RTT session has been terminated by the remote
|
||||||
* side of the coll.
|
* side of the coll.
|
||||||
* @hide
|
|
||||||
*/
|
*/
|
||||||
@TestApi
|
|
||||||
public final void sendRttSessionRemotelyTerminated() {
|
public final void sendRttSessionRemotelyTerminated() {
|
||||||
unsetRttProperty();
|
unsetRttProperty();
|
||||||
mListeners.forEach((l) -> l.onRttSessionRemotelyTerminated(Connection.this));
|
mListeners.forEach((l) -> l.onRttSessionRemotelyTerminated(Connection.this));
|
||||||
@@ -2660,9 +2648,7 @@ public abstract class Connection extends Conferenceable {
|
|||||||
/**
|
/**
|
||||||
* Informs listeners that the remote side of the call has requested an upgrade to include an
|
* Informs listeners that the remote side of the call has requested an upgrade to include an
|
||||||
* RTT session in the call.
|
* RTT session in the call.
|
||||||
* @hide
|
|
||||||
*/
|
*/
|
||||||
@TestApi
|
|
||||||
public final void sendRemoteRttRequest() {
|
public final void sendRemoteRttRequest() {
|
||||||
mListeners.forEach((l) -> l.onRemoteRttRequest(Connection.this));
|
mListeners.forEach((l) -> l.onRemoteRttRequest(Connection.this));
|
||||||
}
|
}
|
||||||
@@ -2936,17 +2922,13 @@ public abstract class Connection extends Conferenceable {
|
|||||||
* request, respectively.
|
* request, respectively.
|
||||||
* @param rttTextStream The object that should be used to send text to or receive text from
|
* @param rttTextStream The object that should be used to send text to or receive text from
|
||||||
* the in-call app.
|
* the in-call app.
|
||||||
* @hide
|
|
||||||
*/
|
*/
|
||||||
@TestApi
|
|
||||||
public void onStartRtt(@NonNull RttTextStream rttTextStream) {}
|
public void onStartRtt(@NonNull RttTextStream rttTextStream) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Notifies this {@link Connection} that it should terminate any existing RTT communication
|
* Notifies this {@link Connection} that it should terminate any existing RTT communication
|
||||||
* channel. No response to Telecom is needed for this method.
|
* channel. No response to Telecom is needed for this method.
|
||||||
* @hide
|
|
||||||
*/
|
*/
|
||||||
@TestApi
|
|
||||||
public void onStopRtt() {}
|
public void onStopRtt() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2954,11 +2936,9 @@ public abstract class Connection extends Conferenceable {
|
|||||||
* request sent via {@link #sendRemoteRttRequest}. Acceptance of the request is
|
* request sent via {@link #sendRemoteRttRequest}. Acceptance of the request is
|
||||||
* indicated by the supplied {@link RttTextStream} being non-null, and rejection is
|
* indicated by the supplied {@link RttTextStream} being non-null, and rejection is
|
||||||
* indicated by {@code rttTextStream} being {@code null}
|
* indicated by {@code rttTextStream} being {@code null}
|
||||||
* @hide
|
|
||||||
* @param rttTextStream The object that should be used to send text to or receive text from
|
* @param rttTextStream The object that should be used to send text to or receive text from
|
||||||
* the in-call app.
|
* the in-call app.
|
||||||
*/
|
*/
|
||||||
@TestApi
|
|
||||||
public void handleRttUpgradeResponse(@Nullable RttTextStream rttTextStream) {}
|
public void handleRttUpgradeResponse(@Nullable RttTextStream rttTextStream) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
package android.telecom;
|
package android.telecom;
|
||||||
|
|
||||||
import android.annotation.TestApi;
|
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
@@ -310,9 +309,7 @@ public final class ConnectionRequest implements Parcelable {
|
|||||||
* send and receive RTT text to/from the in-call app.
|
* send and receive RTT text to/from the in-call app.
|
||||||
* @return An instance of {@link android.telecom.Connection.RttTextStream}, or {@code null}
|
* @return An instance of {@link android.telecom.Connection.RttTextStream}, or {@code null}
|
||||||
* if this connection request is not requesting an RTT session upon connection establishment.
|
* if this connection request is not requesting an RTT session upon connection establishment.
|
||||||
* @hide
|
|
||||||
*/
|
*/
|
||||||
@TestApi
|
|
||||||
public Connection.RttTextStream getRttTextStream() {
|
public Connection.RttTextStream getRttTextStream() {
|
||||||
if (isRequestingRtt()) {
|
if (isRequestingRtt()) {
|
||||||
return new Connection.RttTextStream(mRttPipeToInCall, mRttPipeFromInCall);
|
return new Connection.RttTextStream(mRttPipeToInCall, mRttPipeFromInCall);
|
||||||
@@ -324,9 +321,7 @@ public final class ConnectionRequest implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* Convenience method for determining whether the ConnectionRequest is requesting an RTT session
|
* Convenience method for determining whether the ConnectionRequest is requesting an RTT session
|
||||||
* @return {@code true} if RTT is requested, {@code false} otherwise.
|
* @return {@code true} if RTT is requested, {@code false} otherwise.
|
||||||
* @hide
|
|
||||||
*/
|
*/
|
||||||
@TestApi
|
|
||||||
public boolean isRequestingRtt() {
|
public boolean isRequestingRtt() {
|
||||||
return mRttPipeFromInCall != null && mRttPipeToInCall != null;
|
return mRttPipeFromInCall != null && mRttPipeToInCall != null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user