summaryrefslogtreecommitdiffstats
path: root/voip
diff options
context:
space:
mode:
authorJohan Redestig <johan.redestig@sonymobile.com>2012-08-29 08:19:32 +0200
committerJohan Redestig <johan.redestig@sonymobile.com>2012-08-29 08:21:05 +0200
commit7314532349e402315af9b8f664432dd18292421f (patch)
tree89c9713790764f453375a59d68773f967d82e091 /voip
parentad955fe87f44b43dbb2842fdcbe4e62900b5a07f (diff)
downloadframeworks_base-7314532349e402315af9b8f664432dd18292421f.zip
frameworks_base-7314532349e402315af9b8f664432dd18292421f.tar.gz
frameworks_base-7314532349e402315af9b8f664432dd18292421f.tar.bz2
Make SimpleSessionDescription locale safe
Explicitly use Locale.US in SimpleSessionDescription to avoid unexpected results in some locales. Change-Id: Idb4a36a9e332d302e1b9b940355917c0f738e076
Diffstat (limited to 'voip')
-rw-r--r--voip/java/android/net/sip/SimpleSessionDescription.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/voip/java/android/net/sip/SimpleSessionDescription.java b/voip/java/android/net/sip/SimpleSessionDescription.java
index 29166dc..9fcd21d 100644
--- a/voip/java/android/net/sip/SimpleSessionDescription.java
+++ b/voip/java/android/net/sip/SimpleSessionDescription.java
@@ -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");