Commit 47aedf05 authored by Jason Monk's avatar Jason Monk Committed by The Android Automerger

Guard against monkey crash.

Bug: 25813437
Change-Id: Id86c775b235ee303dc05c1cf70a407bf5472b17c
parent 412cd560
......@@ -523,6 +523,9 @@ public class WifiSettings extends RestrictedSettingsFragment
public boolean onPreferenceTreeClick(Preference preference) {
if (preference instanceof AccessPointPreference) {
mSelectedAccessPoint = ((AccessPointPreference) preference).getAccessPoint();
if (mSelectedAccessPoint == null) {
return false;
}
/** Bypass dialog for unsecured, unsaved, and inactive networks */
if (mSelectedAccessPoint.getSecurity() == AccessPoint.SECURITY_NONE &&
!mSelectedAccessPoint.isSaved() && !mSelectedAccessPoint.isActive()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment