am fffc9bef: Merge "Precreate a data structure so it\'s never null." into jb-mr1-dev

* commit 'fffc9bef49428ac4974ed5c1ee2e4d0c0f9d4a5a':
  Precreate a data structure so it's never null.
This commit is contained in:
Robert Greenwalt
2012-09-27 13:12:57 -07:00
committed by Android Git Automerger

View File

@@ -73,7 +73,7 @@ public class VpnSettings extends SettingsPreferenceFragment implements
private final KeyStore mKeyStore = KeyStore.getInstance();
private boolean mUnlocking = false;
private HashMap<String, VpnPreference> mPreferences;
private HashMap<String, VpnPreference> mPreferences = new HashMap<String, VpnPreference>();
private VpnDialog mDialog;
private Handler mUpdater;
@@ -173,8 +173,7 @@ public class VpnSettings extends SettingsPreferenceFragment implements
// Currently we are the only user of profiles in KeyStore.
// Assuming KeyStore and KeyGuard do the right thing, we can
// safely cache profiles in the memory.
if (mPreferences == null) {
mPreferences = new HashMap<String, VpnPreference>();
if (mPreferences.size() == 0) {
PreferenceGroup group = getPreferenceScreen();
final Context context = getActivity();