diff options
| author | Johan Redestig <johan.redestig@sonymobile.com> | 2012-08-29 08:19:32 +0200 |
|---|---|---|
| committer | Johan Redestig <johan.redestig@sonymobile.com> | 2012-08-29 08:21:05 +0200 |
| commit | 0226eb00cecf82b53e29758c04cd1b39015d2909 (patch) | |
| tree | 0b0c2476a6b291a02ea7a4534c67bac26f159956 | |
| parent | 0f2903af8e17af27f5cbb784842cca0e2f4fc4d5 (diff) | |
| download | android_frameworks_opt_net_voip-0226eb00cecf82b53e29758c04cd1b39015d2909.tar.gz android_frameworks_opt_net_voip-0226eb00cecf82b53e29758c04cd1b39015d2909.tar.bz2 android_frameworks_opt_net_voip-0226eb00cecf82b53e29758c04cd1b39015d2909.zip | |
Make SimpleSessionDescription locale safe
Explicitly use Locale.US in SimpleSessionDescription to avoid
unexpected results in some locales.
Change-Id: Idb4a36a9e332d302e1b9b940355917c0f738e076
| -rw-r--r-- | java/android/net/sip/SimpleSessionDescription.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/java/android/net/sip/SimpleSessionDescription.java b/java/android/net/sip/SimpleSessionDescription.java index 29166dc..9fcd21d 100644 --- a/java/android/net/sip/SimpleSessionDescription.java +++ b/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"); |
