summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorRobert Greenwalt <rgreenwalt@google.com>2011-12-07 09:58:48 -0800
committerRobert Greenwalt <rgreenwalt@google.com>2011-12-07 09:58:48 -0800
commitd4420ab2fbb85280d2f507072fe0bd820ac26a3f (patch)
tree966cb38b7d3d7c75576eba40e3f2912cfd6f8c0d /telephony
parent74b496dd8aab7e29bcba0c6502f773555c4ce29f (diff)
downloadframeworks_base-d4420ab2fbb85280d2f507072fe0bd820ac26a3f.zip
frameworks_base-d4420ab2fbb85280d2f507072fe0bd820ac26a3f.tar.gz
frameworks_base-d4420ab2fbb85280d2f507072fe0bd820ac26a3f.tar.bz2
Trim leading zeros from ipv4 addrs.
Underlying libraries will interpret leading zeros as octal values and fail. bug:5262995 Change-Id: Iff949225bb6b941f7274ee81754e1f41ed719a6c
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index 11f1623..963db2c 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -914,10 +914,16 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker {
cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.NUMERIC)),
cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.NAME)),
cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.APN)),
- cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.PROXY)),
+ NetworkUtils.trimV4AddrZeros(
+ cursor.getString(
+ cursor.getColumnIndexOrThrow(Telephony.Carriers.PROXY))),
cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.PORT)),
- cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.MMSC)),
- cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.MMSPROXY)),
+ NetworkUtils.trimV4AddrZeros(
+ cursor.getString(
+ cursor.getColumnIndexOrThrow(Telephony.Carriers.MMSC))),
+ NetworkUtils.trimV4AddrZeros(
+ cursor.getString(
+ cursor.getColumnIndexOrThrow(Telephony.Carriers.MMSPROXY))),
cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.MMSPORT)),
cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.USER)),
cursor.getString(cursor.getColumnIndexOrThrow(Telephony.Carriers.PASSWORD)),