am bde55601: Merge "Fixed a Null Pointer Exception when Wifi Settings is indexing." into lmp-dev

* commit 'bde55601ba5695894b7f9b8c7f61fd6694f9b459':
  Fixed a Null Pointer Exception when Wifi Settings is indexing.
This commit is contained in:
PauloftheWest
2014-09-02 18:27:20 +00:00
committed by Android Git Automerger

View File

@@ -271,9 +271,13 @@ class AccessPoint extends Preference {
// set the icon (drawable) to that state's drawable.
StateListDrawable sld = (StateListDrawable) context.getTheme()
.obtainStyledAttributes(wifi_signal_attributes).getDrawable(0);
sld.setState((security != SECURITY_NONE) ? STATE_SECURED : STATE_NONE);
drawable = sld.getCurrent();
setIcon(drawable);
// If sld is null then we are indexing and therefore do not have access to
// (nor need to display) the drawable.
if (sld != null) {
sld.setState((security != SECURITY_NONE) ? STATE_SECURED : STATE_NONE);
drawable = sld.getCurrent();
setIcon(drawable);
}
}
if (drawable != null) {