List of usage examples for android.net.wifi WifiConfiguration getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:org.wahtod.wififixer.ui.ConnectFragment.java
private static WifiConfiguration addHiddenFields(WifiConfiguration w) { try {//w w w. ja v a2s .c om Field f = w.getClass().getField(IP_ASSIGNMENT); Field f2 = w.getClass().getField(PROXY_SETTINGS); Class<?> ipc = Class.forName(IPASSIGNMENT_CLASS); Class<?> proxy = Class.forName(PROXY_CLASS); Field dhcp = ipc.getField(DHCP_CONSTANT); Field none = proxy.getField(NONE_CONSTANT); Object v = dhcp.get(null); Object v2 = none.get(null); f.set(w, v); f2.set(w, v2); } catch (Exception e) { /* * Log */ e.printStackTrace(); } return w; }