Loading api/current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -36887,7 +36887,8 @@ package android.telecom { public static final class Call.RttCall { method public int getRttAudioMode(); method public java.lang.String read(); method public java.lang.String read() throws java.io.IOException; method public java.lang.String readImmediately() throws java.io.IOException; method public void setRttMode(int); method public void write(java.lang.String) throws java.io.IOException; field public static final int RTT_MODE_FULL = 1; // 0x1 api/system-current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -39865,7 +39865,8 @@ package android.telecom { public static final class Call.RttCall { method public int getRttAudioMode(); method public java.lang.String read(); method public java.lang.String read() throws java.io.IOException; method public java.lang.String readImmediately() throws java.io.IOException; method public void setRttMode(int); method public void write(java.lang.String) throws java.io.IOException; field public static final int RTT_MODE_FULL = 1; // 0x1 api/test-current.txt +18 −1 Original line number Diff line number Diff line Loading @@ -36970,7 +36970,8 @@ package android.telecom { public static final class Call.RttCall { method public int getRttAudioMode(); method public java.lang.String read(); method public java.lang.String read() throws java.io.IOException; method public java.lang.String readImmediately() throws java.io.IOException; method public void setRttMode(int); method public void write(java.lang.String) throws java.io.IOException; field public static final int RTT_MODE_FULL = 1; // 0x1 Loading Loading @@ -37090,6 +37091,7 @@ package android.telecom { method public final int getState(); method public final android.telecom.StatusHints getStatusHints(); method public final android.telecom.Connection.VideoProvider getVideoProvider(); method public void handleRttUpgradeResponse(android.telecom.Connection.RttTextStream); method public final boolean isRingbackRequested(); method public void onAbort(); method public void onAnswer(int); Loading @@ -37106,14 +37108,20 @@ package android.telecom { method public void onReject(java.lang.String); method public void onSeparate(); method public void onShowIncomingCallUi(); method public void onStartRtt(android.telecom.Connection.RttTextStream); method public void onStateChanged(int); method public void onStopDtmfTone(); method public void onStopRtt(); method public void onUnhold(); method public static java.lang.String propertiesToString(int); method public final void putExtras(android.os.Bundle); method public final void removeExtras(java.util.List<java.lang.String>); method public final void removeExtras(java.lang.String...); 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 setAddress(android.net.Uri, int); method public final void setAudioModeIsVoip(boolean); Loading Loading @@ -37167,6 +37175,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 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_RTT = 256; // 0x100 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_DIALING = 3; // 0x3 Loading @@ -37187,6 +37196,12 @@ package android.telecom { 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 { ctor public Connection.VideoProvider(); method public void changeCameraCapabilities(android.telecom.VideoProfile.CameraCapabilities); Loading Loading @@ -37227,7 +37242,9 @@ package android.telecom { method public android.telecom.PhoneAccountHandle getAccountHandle(); method public android.net.Uri getAddress(); method public android.os.Bundle getExtras(); method public android.telecom.Connection.RttTextStream getRttTextStream(); method public int getVideoState(); method public boolean isRequestingRtt(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.telecom.ConnectionRequest> CREATOR; } telecomm/java/android/telecom/Call.java +18 −9 Original line number Diff line number Diff line Loading @@ -1001,15 +1001,24 @@ public final class Call { * @return A string containing text sent by the remote user, or {@code null} if the * conversation has been terminated or if there was an error while reading. */ public String read() { try { public String read() throws IOException { int numRead = mReceiveStream.read(mReadBuffer, 0, READ_BUFFER_SIZE); if (numRead < 0) { return null; } return new String(mReadBuffer, 0, numRead); } catch (IOException e) { Log.w(this, "Exception encountered when reading from InputStreamReader: %s", e); } /** * Non-blocking version of {@link #read()}. Returns {@code null} if there is nothing to * be read. * @return A string containing text entered by the user, or {@code null} if the user has * not entered any new text yet. */ public String readImmediately() throws IOException { if (mReceiveStream.ready()) { return read(); } else { return null; } } Loading telecomm/java/android/telecom/Connection.java +48 −10 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.annotation.TestApi; import android.app.Notification; import android.content.Intent; import android.hardware.camera2.CameraManager; Loading Loading @@ -395,9 +396,11 @@ public abstract class Connection extends Conferenceable { public static final int PROPERTY_SELF_MANAGED = 1<<7; /** * When set, indicates that a connection has an active RTT session associated with it. * Set by the framework to indicate that a connection has an active RTT session associated with * it. * @hide */ @TestApi public static final int PROPERTY_IS_RTT = 1 << 8; //********************************************************************************************** Loading Loading @@ -791,6 +794,7 @@ public abstract class Connection extends Conferenceable { * Provides methods to read and write RTT data to/from the in-call app. * @hide */ @TestApi public static final class RttTextStream { private static final int READ_BUFFER_SIZE = 1000; private final InputStreamReader mPipeFromInCall; Loading Loading @@ -836,15 +840,24 @@ public abstract class Connection extends Conferenceable { * @return A string containing text entered by the user, or {@code null} if the * conversation has been terminated or if there was an error while reading. */ public String read() { try { public String read() throws IOException { int numRead = mPipeFromInCall.read(mReadBuffer, 0, READ_BUFFER_SIZE); if (numRead < 0) { return null; } return new String(mReadBuffer, 0, numRead); } catch (IOException e) { Log.w(this, "Exception encountered when reading from InputStreamReader: %s", e); } /** * Non-blocking version of {@link #read()}. Returns {@code null} if there is nothing to * be read. * @return A string containing text entered by the user, or {@code null} if the user has * not entered any new text yet. */ public String readImmediately() throws IOException { if (mPipeFromInCall.ready()) { return read(); } else { return null; } } Loading Loading @@ -2503,7 +2516,9 @@ public abstract class Connection extends Conferenceable { * {@link #onStartRtt(ParcelFileDescriptor, ParcelFileDescriptor)} has succeeded. * @hide */ @TestApi public final void sendRttInitiationSuccess() { setRttProperty(); mListeners.forEach((l) -> l.onRttInitiationSuccess(Connection.this)); } Loading @@ -2516,7 +2531,9 @@ public abstract class Connection extends Conferenceable { * exception of {@link RttModifyStatus#SESSION_MODIFY_REQUEST_SUCCESS}. * @hide */ @TestApi public final void sendRttInitiationFailure(int reason) { unsetRttProperty(); mListeners.forEach((l) -> l.onRttInitiationFailure(Connection.this, reason)); } Loading @@ -2525,6 +2542,7 @@ public abstract class Connection extends Conferenceable { * side of the coll. * @hide */ @TestApi public final void sendRttSessionRemotelyTerminated() { mListeners.forEach((l) -> l.onRttSessionRemotelyTerminated(Connection.this)); } Loading @@ -2534,6 +2552,7 @@ public abstract class Connection extends Conferenceable { * RTT session in the call. * @hide */ @TestApi public final void sendRemoteRttRequest() { mListeners.forEach((l) -> l.onRemoteRttRequest(Connection.this)); } Loading Loading @@ -2752,6 +2771,7 @@ public abstract class Connection extends Conferenceable { * the in-call app. * @hide */ @TestApi public void onStartRtt(@NonNull RttTextStream rttTextStream) {} /** Loading @@ -2759,6 +2779,7 @@ public abstract class Connection extends Conferenceable { * channel. No response to Telecom is needed for this method. * @hide */ @TestApi public void onStopRtt() {} /** Loading @@ -2770,8 +2791,25 @@ public abstract class Connection extends Conferenceable { * @param rttTextStream The object that should be used to send text to or receive text from * the in-call app. */ @TestApi public void handleRttUpgradeResponse(@Nullable RttTextStream rttTextStream) {} /** * Internal method to set {@link #PROPERTY_IS_RTT}. * @hide */ void setRttProperty() { setConnectionProperties(getConnectionProperties() | PROPERTY_IS_RTT); } /** * Internal method to un-set {@link #PROPERTY_IS_RTT}. * @hide */ void unsetRttProperty() { setConnectionProperties(getConnectionProperties() & (~PROPERTY_IS_RTT)); } static String toLogSafePhoneNumber(String number) { // For unknown number, log empty string. if (number == null) { Loading Loading
api/current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -36887,7 +36887,8 @@ package android.telecom { public static final class Call.RttCall { method public int getRttAudioMode(); method public java.lang.String read(); method public java.lang.String read() throws java.io.IOException; method public java.lang.String readImmediately() throws java.io.IOException; method public void setRttMode(int); method public void write(java.lang.String) throws java.io.IOException; field public static final int RTT_MODE_FULL = 1; // 0x1
api/system-current.txt +2 −1 Original line number Diff line number Diff line Loading @@ -39865,7 +39865,8 @@ package android.telecom { public static final class Call.RttCall { method public int getRttAudioMode(); method public java.lang.String read(); method public java.lang.String read() throws java.io.IOException; method public java.lang.String readImmediately() throws java.io.IOException; method public void setRttMode(int); method public void write(java.lang.String) throws java.io.IOException; field public static final int RTT_MODE_FULL = 1; // 0x1
api/test-current.txt +18 −1 Original line number Diff line number Diff line Loading @@ -36970,7 +36970,8 @@ package android.telecom { public static final class Call.RttCall { method public int getRttAudioMode(); method public java.lang.String read(); method public java.lang.String read() throws java.io.IOException; method public java.lang.String readImmediately() throws java.io.IOException; method public void setRttMode(int); method public void write(java.lang.String) throws java.io.IOException; field public static final int RTT_MODE_FULL = 1; // 0x1 Loading Loading @@ -37090,6 +37091,7 @@ package android.telecom { method public final int getState(); method public final android.telecom.StatusHints getStatusHints(); method public final android.telecom.Connection.VideoProvider getVideoProvider(); method public void handleRttUpgradeResponse(android.telecom.Connection.RttTextStream); method public final boolean isRingbackRequested(); method public void onAbort(); method public void onAnswer(int); Loading @@ -37106,14 +37108,20 @@ package android.telecom { method public void onReject(java.lang.String); method public void onSeparate(); method public void onShowIncomingCallUi(); method public void onStartRtt(android.telecom.Connection.RttTextStream); method public void onStateChanged(int); method public void onStopDtmfTone(); method public void onStopRtt(); method public void onUnhold(); method public static java.lang.String propertiesToString(int); method public final void putExtras(android.os.Bundle); method public final void removeExtras(java.util.List<java.lang.String>); method public final void removeExtras(java.lang.String...); 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 setAddress(android.net.Uri, int); method public final void setAudioModeIsVoip(boolean); Loading Loading @@ -37167,6 +37175,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 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_RTT = 256; // 0x100 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_DIALING = 3; // 0x3 Loading @@ -37187,6 +37196,12 @@ package android.telecom { 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 { ctor public Connection.VideoProvider(); method public void changeCameraCapabilities(android.telecom.VideoProfile.CameraCapabilities); Loading Loading @@ -37227,7 +37242,9 @@ package android.telecom { method public android.telecom.PhoneAccountHandle getAccountHandle(); method public android.net.Uri getAddress(); method public android.os.Bundle getExtras(); method public android.telecom.Connection.RttTextStream getRttTextStream(); method public int getVideoState(); method public boolean isRequestingRtt(); method public void writeToParcel(android.os.Parcel, int); field public static final android.os.Parcelable.Creator<android.telecom.ConnectionRequest> CREATOR; }
telecomm/java/android/telecom/Call.java +18 −9 Original line number Diff line number Diff line Loading @@ -1001,15 +1001,24 @@ public final class Call { * @return A string containing text sent by the remote user, or {@code null} if the * conversation has been terminated or if there was an error while reading. */ public String read() { try { public String read() throws IOException { int numRead = mReceiveStream.read(mReadBuffer, 0, READ_BUFFER_SIZE); if (numRead < 0) { return null; } return new String(mReadBuffer, 0, numRead); } catch (IOException e) { Log.w(this, "Exception encountered when reading from InputStreamReader: %s", e); } /** * Non-blocking version of {@link #read()}. Returns {@code null} if there is nothing to * be read. * @return A string containing text entered by the user, or {@code null} if the user has * not entered any new text yet. */ public String readImmediately() throws IOException { if (mReceiveStream.ready()) { return read(); } else { return null; } } Loading
telecomm/java/android/telecom/Connection.java +48 −10 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.SystemApi; import android.annotation.TestApi; import android.app.Notification; import android.content.Intent; import android.hardware.camera2.CameraManager; Loading Loading @@ -395,9 +396,11 @@ public abstract class Connection extends Conferenceable { public static final int PROPERTY_SELF_MANAGED = 1<<7; /** * When set, indicates that a connection has an active RTT session associated with it. * Set by the framework to indicate that a connection has an active RTT session associated with * it. * @hide */ @TestApi public static final int PROPERTY_IS_RTT = 1 << 8; //********************************************************************************************** Loading Loading @@ -791,6 +794,7 @@ public abstract class Connection extends Conferenceable { * Provides methods to read and write RTT data to/from the in-call app. * @hide */ @TestApi public static final class RttTextStream { private static final int READ_BUFFER_SIZE = 1000; private final InputStreamReader mPipeFromInCall; Loading Loading @@ -836,15 +840,24 @@ public abstract class Connection extends Conferenceable { * @return A string containing text entered by the user, or {@code null} if the * conversation has been terminated or if there was an error while reading. */ public String read() { try { public String read() throws IOException { int numRead = mPipeFromInCall.read(mReadBuffer, 0, READ_BUFFER_SIZE); if (numRead < 0) { return null; } return new String(mReadBuffer, 0, numRead); } catch (IOException e) { Log.w(this, "Exception encountered when reading from InputStreamReader: %s", e); } /** * Non-blocking version of {@link #read()}. Returns {@code null} if there is nothing to * be read. * @return A string containing text entered by the user, or {@code null} if the user has * not entered any new text yet. */ public String readImmediately() throws IOException { if (mPipeFromInCall.ready()) { return read(); } else { return null; } } Loading Loading @@ -2503,7 +2516,9 @@ public abstract class Connection extends Conferenceable { * {@link #onStartRtt(ParcelFileDescriptor, ParcelFileDescriptor)} has succeeded. * @hide */ @TestApi public final void sendRttInitiationSuccess() { setRttProperty(); mListeners.forEach((l) -> l.onRttInitiationSuccess(Connection.this)); } Loading @@ -2516,7 +2531,9 @@ public abstract class Connection extends Conferenceable { * exception of {@link RttModifyStatus#SESSION_MODIFY_REQUEST_SUCCESS}. * @hide */ @TestApi public final void sendRttInitiationFailure(int reason) { unsetRttProperty(); mListeners.forEach((l) -> l.onRttInitiationFailure(Connection.this, reason)); } Loading @@ -2525,6 +2542,7 @@ public abstract class Connection extends Conferenceable { * side of the coll. * @hide */ @TestApi public final void sendRttSessionRemotelyTerminated() { mListeners.forEach((l) -> l.onRttSessionRemotelyTerminated(Connection.this)); } Loading @@ -2534,6 +2552,7 @@ public abstract class Connection extends Conferenceable { * RTT session in the call. * @hide */ @TestApi public final void sendRemoteRttRequest() { mListeners.forEach((l) -> l.onRemoteRttRequest(Connection.this)); } Loading Loading @@ -2752,6 +2771,7 @@ public abstract class Connection extends Conferenceable { * the in-call app. * @hide */ @TestApi public void onStartRtt(@NonNull RttTextStream rttTextStream) {} /** Loading @@ -2759,6 +2779,7 @@ public abstract class Connection extends Conferenceable { * channel. No response to Telecom is needed for this method. * @hide */ @TestApi public void onStopRtt() {} /** Loading @@ -2770,8 +2791,25 @@ public abstract class Connection extends Conferenceable { * @param rttTextStream The object that should be used to send text to or receive text from * the in-call app. */ @TestApi public void handleRttUpgradeResponse(@Nullable RttTextStream rttTextStream) {} /** * Internal method to set {@link #PROPERTY_IS_RTT}. * @hide */ void setRttProperty() { setConnectionProperties(getConnectionProperties() | PROPERTY_IS_RTT); } /** * Internal method to un-set {@link #PROPERTY_IS_RTT}. * @hide */ void unsetRttProperty() { setConnectionProperties(getConnectionProperties() & (~PROPERTY_IS_RTT)); } static String toLogSafePhoneNumber(String number) { // For unknown number, log empty string. if (number == null) { Loading