Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf3e62b8 authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by android code review
Browse files

Merge "Make SimpleSessionDescription locale safe"

parents bb60bc26 73145323
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.net.sip;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Locale;

/**
 * An object used to manipulate messages of Session Description Protocol (SDP).
@@ -66,7 +67,7 @@ public class SimpleSessionDescription {
    public SimpleSessionDescription(long sessionId, String address) {
        address = (address.indexOf(':') < 0 ? "IN IP4 " : "IN IP6 ") + address;
        mFields.parse("v=0");
        mFields.parse(String.format("o=- %d %d %s", sessionId,
        mFields.parse(String.format(Locale.US, "o=- %d %d %s", sessionId,
                System.currentTimeMillis(), address));
        mFields.parse("s=-");
        mFields.parse("t=0 0");