Storing preferences for handling orientation change.