summaryrefslogtreecommitdiffstats
path: root/packages/SettingsProvider/src
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2012-12-12 11:46:41 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-12-12 11:46:41 -0800
commit912f01865ab879314ac86dc9a61b62e2e7bd5911 (patch)
tree578c5ae82d7adb4ed082baed41d528d552eda7bc /packages/SettingsProvider/src
parentca059d6d1f62db8c094ce9d1451cc7a386d04aaf (diff)
parent68c308607b01bafd31c91572a81f4563e2199260 (diff)
downloadframeworks_base-912f01865ab879314ac86dc9a61b62e2e7bd5911.zip
frameworks_base-912f01865ab879314ac86dc9a61b62e2e7bd5911.tar.gz
frameworks_base-912f01865ab879314ac86dc9a61b62e2e7bd5911.tar.bz2
am 68c30860: am 73f24ae1: am 9a147340: Merge "Don\'t update global table when upgrading secondary users\' database." into jb-mr1.1-dev
* commit '68c308607b01bafd31c91572a81f4563e2199260': Don't update global table when upgrading secondary users' database.
Diffstat (limited to 'packages/SettingsProvider/src')
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java24
1 files changed, 13 insertions, 11 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index b2f1d3f..fd0b79f 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -1507,17 +1507,19 @@ public class DatabaseHelper extends SQLiteOpenHelper {
if (upgradeVersion == 94) {
// Add wireless charging started sound setting
- db.beginTransaction();
- SQLiteStatement stmt = null;
- try {
- stmt = db.compileStatement("INSERT OR REPLACE INTO global(name,value)"
- + " VALUES(?,?);");
- loadStringSetting(stmt, Settings.Global.WIRELESS_CHARGING_STARTED_SOUND,
- R.string.def_wireless_charging_started_sound);
- db.setTransactionSuccessful();
- } finally {
- db.endTransaction();
- if (stmt != null) stmt.close();
+ if (mUserHandle == UserHandle.USER_OWNER) {
+ db.beginTransaction();
+ SQLiteStatement stmt = null;
+ try {
+ stmt = db.compileStatement("INSERT OR REPLACE INTO global(name,value)"
+ + " VALUES(?,?);");
+ loadStringSetting(stmt, Settings.Global.WIRELESS_CHARGING_STARTED_SOUND,
+ R.string.def_wireless_charging_started_sound);
+ db.setTransactionSuccessful();
+ } finally {
+ db.endTransaction();
+ if (stmt != null) stmt.close();
+ }
}
upgradeVersion = 95;
}