OSDN Git Service

Refine in-place conversion semantics for Settings
authorAlan Newberger <alann@google.com>
Mon, 13 Oct 2014 19:17:04 +0000 (12:17 -0700)
committerAlan Newberger <alann@google.com>
Mon, 13 Oct 2014 19:49:40 +0000 (12:49 -0700)
commit6293c579bce8356f10cda31637917537a4501437
tree9ff1bfe9d0a9199b001b2ab53455b76a44f874ba
parent4d4585da32d9b5a47bffad1deeb08fc5cd128311
Refine in-place conversion semantics for Settings

Since settings are now stored as strings, avoid app crashes
for settings which are still around as other types, and just
treat it as if those settings are absent (return default). This
requires re-working the version number tracker itself, which
is done by making it a new key and migrating just the old
key in the getLastVersion override. This is somewhat cleaner
and overall the change should increase stability given the
change to use in place values of different types.

Bug: 17949433
Change-Id: Icaf0d9653eabb9e144f3946a51b4038d3ed48ea9
src/com/android/camera/settings/AppUpgrader.java
src/com/android/camera/settings/Keys.java
src/com/android/camera/settings/SettingsManager.java