Merge "[RCS]Migrate from getEncodedMessage() to toEncodedMessage()"
This commit is contained in:
@@ -12004,7 +12004,6 @@ package android.telephony.ims {
|
|||||||
method public int describeContents();
|
method public int describeContents();
|
||||||
method @Nullable public String getCallIdParameter();
|
method @Nullable public String getCallIdParameter();
|
||||||
method @NonNull public byte[] getContent();
|
method @NonNull public byte[] getContent();
|
||||||
method @Deprecated @NonNull public byte[] getEncodedMessage();
|
|
||||||
method @NonNull public String getHeaderSection();
|
method @NonNull public String getHeaderSection();
|
||||||
method @NonNull public String getStartLine();
|
method @NonNull public String getStartLine();
|
||||||
method @NonNull public String getViaBranchParameter();
|
method @NonNull public String getViaBranchParameter();
|
||||||
|
|||||||
@@ -202,23 +202,6 @@ public final class SipMessage implements Parcelable {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the UTF-8 encoded SIP message.
|
|
||||||
* @deprecated Use {@link #toEncodedMessage} instead
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public @NonNull byte[] getEncodedMessage() {
|
|
||||||
byte[] header = new StringBuilder()
|
|
||||||
.append(mStartLine)
|
|
||||||
.append(mHeaderSection)
|
|
||||||
.append(CRLF)
|
|
||||||
.toString().getBytes(UTF_8);
|
|
||||||
byte[] sipMessage = new byte[header.length + mContent.length];
|
|
||||||
System.arraycopy(header, 0, sipMessage, 0, header.length);
|
|
||||||
System.arraycopy(mContent, 0, sipMessage, header.length, mContent.length);
|
|
||||||
return sipMessage;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* According RFC-3261 section 7, SIP is a text protocol and uses the UTF-8 charset. Its format
|
* According RFC-3261 section 7, SIP is a text protocol and uses the UTF-8 charset. Its format
|
||||||
* consists of a start-line, one or more header fields, an empty line indicating the end of the
|
* consists of a start-line, one or more header fields, an empty line indicating the end of the
|
||||||
|
|||||||
Reference in New Issue
Block a user