diff options
author | Tyler Gunn <tgunn@google.com> | 2014-09-02 08:39:35 -0700 |
---|---|---|
committer | Tyler Gunn <tgunn@google.com> | 2014-09-02 08:39:35 -0700 |
commit | 2c830a2905b07639984499529f9a19aeb779a539 (patch) | |
tree | c3713b0d451693b5d6e7bea94eead3491f2733ad /packages/SettingsProvider | |
parent | 56d3cb3013f06e3fd3f99a63d071dc0a72c92af9 (diff) | |
download | frameworks_base-2c830a2905b07639984499529f9a19aeb779a539.zip frameworks_base-2c830a2905b07639984499529f9a19aeb779a539.tar.gz frameworks_base-2c830a2905b07639984499529f9a19aeb779a539.tar.bz2 |
Remove "ask each time" SIP call setting. (1/2)
1. Removed setting from Settings.System class.
2. Added settings database migration step to change "SIP_ASK_ME_EACH_TIME"
to "SIP_ADDRESS_ONLY" as the "ask me each time" option no longer makes
sense given the new phone accounts settings.
Bug: 17321422
Change-Id: I3df1be4fcda44f2097c49af44508ac1fce72a24b
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java | 23 |
1 files changed, 22 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 fd5e6fe..17593fe 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -70,7 +70,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 = 109; + private static final int DATABASE_VERSION = 110; private Context mContext; private int mUserHandle; @@ -1749,6 +1749,27 @@ public class DatabaseHelper extends SQLiteOpenHelper { upgradeVersion = 109; } + if (upgradeVersion < 110) { + // The SIP_CALL_OPTIONS value SIP_ASK_EACH_TIME is being deprecated. + // If the SIP_CALL_OPTIONS setting is set to SIP_ASK_EACH_TIME, default to + // SIP_ADDRESS_ONLY. + db.beginTransaction(); + SQLiteStatement stmt = null; + try { + stmt = db.compileStatement("UPDATE system SET value = ? " + + "WHERE name = ? AND value = ?;"); + stmt.bindString(1, Settings.System.SIP_ADDRESS_ONLY); + stmt.bindString(2, Settings.System.SIP_CALL_OPTIONS); + stmt.bindString(3, Settings.System.SIP_ASK_ME_EACH_TIME); + stmt.execute(); + db.setTransactionSuccessful(); + } finally { + db.endTransaction(); + if (stmt != null) stmt.close(); + } + upgradeVersion = 110; + } + // *** Remember to update DATABASE_VERSION above! if (upgradeVersion != currentVersion) { |