diff options
author | Jason Monk <jmonk@google.com> | 2014-10-31 13:18:21 -0400 |
---|---|---|
committer | Jason Monk <jmonk@google.com> | 2014-10-31 14:47:13 -0400 |
commit | 94cfd9d7c42287c18bde29aa1ae34944eb448f45 (patch) | |
tree | 3cab20e716d00e6d829802ca5307d932d5d8170b /packages/SettingsProvider | |
parent | 685a8770c018d02080d29f18fcb9e50a182912aa (diff) | |
download | frameworks_base-94cfd9d7c42287c18bde29aa1ae34944eb448f45.zip frameworks_base-94cfd9d7c42287c18bde29aa1ae34944eb448f45.tar.gz frameworks_base-94cfd9d7c42287c18bde29aa1ae34944eb448f45.tar.bz2 |
Move LOCK_TO_APP_EXIT_LOCKED from System to Secure
To prepare for controlling from settings.
While here, add lock to app settings to backups.
Bug: 16957435
Change-Id: I059140cd07a7a0d5ceb4e0bfe5e0176cb96629d3
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index eea97ea..9bfcadb 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -71,7 +71,7 @@ public class DatabaseHelper extends SQLiteOpenHelper { // database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion' // is properly propagated through your change. Not doing so will result in a loss of user // settings. - private static final int DATABASE_VERSION = 116; + private static final int DATABASE_VERSION = 117; private Context mContext; private int mUserHandle; @@ -1865,6 +1865,20 @@ public class DatabaseHelper extends SQLiteOpenHelper { upgradeVersion = 116; } + if (upgradeVersion < 117) { + db.beginTransaction(); + try { + String[] systemToSecure = { + Settings.Secure.LOCK_TO_APP_EXIT_LOCKED + }; + moveSettingsToNewTable(db, TABLE_SYSTEM, TABLE_SECURE, systemToSecure, true); + db.setTransactionSuccessful(); + } finally { + db.endTransaction(); + } + upgradeVersion = 117; + } + // *** Remember to update DATABASE_VERSION above! if (upgradeVersion != currentVersion) { |