code: private void
  findAndroid() {
  	// This originally looked for all lines containing .dns; but
  	// http://code.google.com/p/android/issues/detail?id=2207#c73
  	// indicates that net.dns* should always be the active nameservers, so
  	// we use those.
  	final String re1 = "^\\d+(\\.\\d+){3}$";
  	final String re2 = "^[0-9a-f]+(:[0-9a-f]*)+:[0-9a-f]+$";
  	ArrayList lserver = new ArrayList();
  	ArrayList lsearch = new ArrayList();
  	try {
  		Class SystemProperties =
  		    Class.forName("android.os.SystemProperties");
  		Method method =
  		    SystemProperties.getMethod("get",
  					       new Class[] { String.class });
  		final String [] netdns = new String [] {"net.dns1", "net.dns2",
  						        "net.dns3", "net.dns4"};
  		for (int i = 0; i < netdns.length; i++) {
  			Object [] args = new Object [] { netdns[i] };
  			String v = (String) method.invoke(null, args);
  			if (v != null &&
  			    (v.matches(re1) || v.matches(re2)) &&
  			    !lserver.contains(v))
  				lserver.add(v);
  		}
  	} catch ( Exception e ) {
  		// ignore resolutely
  	}
  	configureFromLists(lserver, lsearch);
  }
docs: Parses the output of getprop, which is the only way to get DNS
  info on Android. getprop might disappear in future releases, so
  this code comes with a use-by date.