am 3716ea04: am 06906796: If the network SSID is a string, it should be enclosed in double quotation marks.
Merge commit '3716ea04d9fd59ff95bacdf6efac4ab5583e13fc' into kraken * commit '3716ea04d9fd59ff95bacdf6efac4ab5583e13fc': If the network SSID is a string, it should be enclosed in double quotation marks.
This commit is contained in:
@@ -301,7 +301,7 @@ public class ConnectivityManagerTestActivity extends Activity {
|
|||||||
if (sr.SSID.equals(knownSSID)) {
|
if (sr.SSID.equals(knownSSID)) {
|
||||||
Log.v(LOG_TAG, "found " + knownSSID + " in the scan result list");
|
Log.v(LOG_TAG, "found " + knownSSID + " in the scan result list");
|
||||||
WifiConfiguration config = new WifiConfiguration();
|
WifiConfiguration config = new WifiConfiguration();
|
||||||
config.SSID = sr.SSID;
|
config.SSID = convertToQuotedString(sr.SSID);
|
||||||
config.allowedKeyManagement.set(KeyMgmt.NONE);
|
config.allowedKeyManagement.set(KeyMgmt.NONE);
|
||||||
int networkId = mWifiManager.addNetwork(config);
|
int networkId = mWifiManager.addNetwork(config);
|
||||||
// Connect to network by disabling others.
|
// Connect to network by disabling others.
|
||||||
@@ -387,6 +387,10 @@ public class ConnectivityManagerTestActivity extends Activity {
|
|||||||
context.sendBroadcast(intent);
|
context.sendBroadcast(intent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected static String convertToQuotedString(String string) {
|
||||||
|
return "\"" + string + "\"";
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
|
|||||||
Reference in New Issue
Block a user