DataConnection: Use InetAddress.isNumeric rather than a regex.
android.util.Patterns is pretty heavy weight; it can take a long time to initialize and can increase java heap usage (dirty memory) by hundreds of kilobytes. InetAddress.isNumeric provides the same functionality using getaddrinfo(..AI_NUMERIC) and friends, and provides a guarantee that the resulting string will be parseable by InetAddress.getByName and friends can parse it correctly. Bug: 63107244 Test: DataConnectionTest Change-Id: I9078aea83dd2da621576ff3328b975bd65c00b72
Loading
Please register or sign in to comment