opensrp / opensrp-client-immunization

OpenSRP Client Immunization Library
Other
11 stars 15 forks source link

Update SharedPreferences Access to go Through CoreLibrary Instance #168

Open qiarie opened 3 years ago

qiarie commented 3 years ago

A configuration option to encrypt shared preferences was added to opensrp-client-core version 4.2.3-SNAPSHOT.

If access to shared prefs is done by calling PreferenceManager.getDefaultSharedPreferences when the option to encrypt is set to true, Android creates parallel unencrypted shared preferences.

To control this, all access to shared prefs should go through CoreLibrary instance. Utils.getAllSharedPreferences()

CoreLibrary checks the property setting and returns the correct preferences.