Lines Matching refs:ssid
882 private String unquoteSSID(String ssid) { in unquoteSSID() argument
885 if (ssid.charAt(0) == '"') { in unquoteSSID()
886 return ssid.substring(1, ssid.length() - 1); in unquoteSSID()
888 return ssid; in unquoteSSID()
893 final AtomicReference<String> ssid = new AtomicReference<>(); in getWifiSSID() local
895 ssid.set(mWifiManager.getConnectionInfo().getSSID()); in getWifiSSID()
897 return unquoteSSID(ssid.get()); in getWifiSSID()
901 private String getWifiMeteredStatus(String ssid) { in getWifiMeteredStatus() argument
909 final Matcher m = Pattern.compile("^" + ssid + ";(true|false|none)$", in getWifiMeteredStatus()
912 fail("Unexpected format from cmd netpolicy (when looking for " + ssid + "): " in getWifiMeteredStatus()
924 final String ssid = getWifiSSID(); in setWifiMeteredState() local
925 setWifiMeteredState(ssid, metered ? "true" : "false"); in setWifiMeteredState()
929 private void setWifiMeteredState(String ssid, String metered) { in setWifiMeteredState() argument
930 if (metered.equals(getWifiMeteredStatus(ssid))) { in setWifiMeteredState()
933 SystemUtil.runShellCommand("cmd netpolicy set metered-network " + ssid + " " + metered); in setWifiMeteredState()
934 assertEquals(getWifiMeteredStatus(ssid), metered); in setWifiMeteredState()