huangming:merge the main branch to native branch.

huangming:unify the PreferencesProvider.java code.