Add preserveValueInRestore flag to Setting object

Bug: 144838882
Test: SettingsStateTest

This is part of the feature to change settings backup&restore. If a
setting has been modified, restore shouldn't override its value. To
track such settings, add preserveValueInRestore flag and set it to true when a
setting is modified by any package other than 'android' (which modifies
settings during settings upgrade - situation we don't need to consider)

Change-Id: Id6e8e93e9ec9af4c31c88e2aded9332e39fc87da
2 files changed