huangming:unify the PreferencesProvider.java code.