//import android.net.DhcpInfo; //import android.net.wifi.WifiManager; // generified (compiles everywhere) static S androidGetGateway() { O wifii = call(androidContext_gen(), "getSystemService", "wifi"); O d = call(wifii, "getDhcpInfo"); int g = (int) get(d, "gateway"); ret g == 0 ? null : androidGetGateway_intToIP(g); } static S androidGetGateway_intToIP(int addr) { return ((addr & 0xFF) + "." + ((addr >>>= 8) & 0xFF) + "." + ((addr >>>= 8) & 0xFF) + "." + ((addr >>>= 8) & 0xFF)); }