HoloEverywhere
HoloEverywhere copied to clipboard
[BUG]Preferences reseted after a period of time
I don't know what's going on, but this may have sth. to di with it:
11-07 11:18:34.383: W/SharedPreferencesImpl(15678): getSharedPreferences 11-07 11:18:34.383: W/SharedPreferencesImpl(15678): org.xmlpull.v1.XmlPullParserException: Map value without name attribute: float 11-07 11:18:34.383: W/SharedPreferencesImpl(15678): at com.android.internal.util.XmlUtils.readThisMapXml(XmlUtils.java:564) 11-07 11:18:34.383: W/SharedPreferencesImpl(15678): at com.android.internal.util.XmlUtils.readThisValueXml(XmlUtils.java:809) 11-07 11:18:34.383: W/SharedPreferencesImpl(15678): at com.android.internal.util.XmlUtils.readValueXml(XmlUtils.java:751) 11-07 11:18:34.383: W/SharedPreferencesImpl(15678): at com.android.internal.util.XmlUtils.readMapXml(XmlUtils.java:490) 11-07 11:18:34.383: W/SharedPreferencesImpl(15678): at android.app.SharedPreferencesImpl.loadFromDiskLocked(SharedPreferencesImpl.java:120) 11-07 11:18:34.383: W/SharedPreferencesImpl(15678): at android.app.SharedPreferencesImpl.access$000(SharedPreferencesImpl.java:52) 11-07 11:18:34.383: W/SharedPreferencesImpl(15678): at android.app.SharedPreferencesImpl$1.run(SharedPreferencesImpl.java:91) 11-07 11:18:34.401: W/Resources(15678): Converting to string: TypedValue{t=0x10/d=0x4 a=-1}
Does it has sth. to do with using both android.content.sharedpreferences and org.holoeverywhere.content.sharedpreferences?
getPreference(context).edit().putFloat(key, value).commit(); //key != null, or your entire shared preferences may be cleared!