Make addAddress locale safe

Using regular string concatenation to avoid unexpected
results in some locales.

Change-Id: I47dd5e174c4a2e88dc18e014002820cdbf63fcad
This commit is contained in:
Johan Redestig
2012-08-28 09:28:50 +02:00
parent ad955fe87f
commit 3cd42dfd50

View File

@@ -329,7 +329,7 @@ public class VpnService extends Service {
throw new IllegalArgumentException("Bad address");
}
mAddresses.append(String.format(" %s/%d", address.getHostAddress(), prefixLength));
mAddresses.append(' ' + address.getHostAddress() + '/' + prefixLength);
return this;
}