am 2d788324: Merge "Don\'t crash when asked to enable an AP with a null SSID."

* commit '2d78832443f5d6491c75e5641ea2e16b7dffa8d2':
  Don't crash when asked to enable an AP with a null SSID.
This commit is contained in:
vandwalle
2014-05-09 00:53:03 +00:00
committed by Android Git Automerger

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;