Handle the case where GoogleLocationSettingObserver::onChange

is called after GoogleLocationSettingObserver::doNotObserve().

Fixes http://b/issue?id=2147888
This commit is contained in:
Andrei Popescu
2009-09-28 12:42:02 +01:00
parent 81384bf927
commit 7885381f9b

View File

@@ -200,7 +200,11 @@ class GoogleLocationSettingManager {
@Override
public void onChange(boolean selfChange) {
maybeApplySetting(mContext);
// This may come after the call to doNotObserve() above,
// so mContext may be null.
if (mContext != null) {
maybeApplySetting(mContext);
}
}
}
}