Merge "Fix issue #10387684: ArrayIndexOutOfBoundsException in ArrayMap.put" into klp-dev

This commit is contained in:
Dianne Hackborn
2013-09-05 20:38:55 +00:00
committed by Android (Google) Code Review

View File

@@ -710,7 +710,7 @@ class ContextImpl extends Context {
@Override @Override
public SharedPreferences getSharedPreferences(String name, int mode) { public SharedPreferences getSharedPreferences(String name, int mode) {
SharedPreferencesImpl sp; SharedPreferencesImpl sp;
synchronized (mSync) { synchronized (ContextImpl.class) {
if (sSharedPrefs == null) { if (sSharedPrefs == null) {
sSharedPrefs = new ArrayMap<String, ArrayMap<String, SharedPreferencesImpl>>(); sSharedPrefs = new ArrayMap<String, ArrayMap<String, SharedPreferencesImpl>>();
} }