Fix lint error
use apply() instead of commit() when saving shared preferences

Saves to memory asynchronously.