summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Redestig <johan.redestig@sonymobile.com>2012-08-28 09:37:23 +0200
committerJohan Redestig <johan.redestig@sonymobile.com>2012-11-19 11:50:05 +0100
commitfe2164c76a5715e0a8106aacfd78a372d510bc04 (patch)
treec8b1bd0d52c6752918f9c653403f5c7018675e5f
parent18d523fa3e2b6bdc341d3cb9042092ff2c0d9ad2 (diff)
downloadvoip-fe2164c76a5715e0a8106aacfd78a372d510bc04.tar.gz
Make AudioGroup.add locale safe
Explicitly use Locale.US in AudioGroup.add to avoid unexpected results in some locales. Change-Id: Ifb477ca590f630747e09e38ac2246d284b5c5bfc
-rw-r--r--java/android/net/rtp/AudioGroup.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/java/android/net/rtp/AudioGroup.java b/java/android/net/rtp/AudioGroup.java
index 8c19062..8faeb88 100644
--- a/java/android/net/rtp/AudioGroup.java
+++ b/java/android/net/rtp/AudioGroup.java
@@ -19,6 +19,7 @@ package android.net.rtp;
import android.media.AudioManager;
import java.util.HashMap;
+import java.util.Locale;
import java.util.Map;
/**
@@ -146,7 +147,7 @@ public class AudioGroup {
if (!mStreams.containsKey(stream)) {
try {
AudioCodec codec = stream.getCodec();
- String codecSpec = String.format("%d %s %s", codec.type,
+ String codecSpec = String.format(Locale.US, "%d %s %s", codec.type,
codec.rtpmap, codec.fmtp);
int id = nativeAdd(stream.getMode(), stream.getSocket(),
stream.getRemoteAddress().getHostAddress(),