Merge "Don't crash when asked to enable an AP with a null SSID."

This commit is contained in:
vandwalle
2014-05-09 00:49:29 +00:00
committed by Android (Google) Code Review

View File

@@ -506,6 +506,12 @@ public class WifiConfiguration implements Parcelable {
* @hide
*/
public boolean isValid() {
if (SSID == null)
return false;
if (allowedKeyManagement == null)
return false;
if (allowedKeyManagement.cardinality() > 1) {
if (allowedKeyManagement.cardinality() != 2) {
return false;