diff options
author | Gilles Debunne <debunne@google.com> | 2011-07-08 10:40:51 -0700 |
---|---|---|
committer | Gilles Debunne <debunne@google.com> | 2011-07-08 11:21:09 -0700 |
commit | fa53d3002fadf8640600c1840962021a821b8bae (patch) | |
tree | 74e18a4f49b84ec41d89f60ebf4fdec689699f77 /packages/SettingsProvider | |
parent | 532fee45e22acdf779c7135db9a145fe9928c50c (diff) | |
download | frameworks_base-fa53d3002fadf8640600c1840962021a821b8bae.zip frameworks_base-fa53d3002fadf8640600c1840962021a821b8bae.tar.gz frameworks_base-fa53d3002fadf8640600c1840962021a821b8bae.tar.bz2 |
Animation settings reset to default
Change-Id: Ie53c031ceb88d356742e80693edc14198506d54a
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r-- | packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java index 47ab150..afe4246 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java @@ -16,17 +16,6 @@ package com.android.providers.settings; -import com.android.internal.content.PackageHelper; -import com.android.internal.telephony.BaseCommands; -import com.android.internal.telephony.Phone; -import com.android.internal.telephony.RILConstants; -import com.android.internal.util.XmlUtils; -import com.android.internal.widget.LockPatternUtils; -import com.android.internal.widget.LockPatternView; - -import org.xmlpull.v1.XmlPullParser; -import org.xmlpull.v1.XmlPullParserException; - import android.content.ComponentName; import android.content.ContentValues; import android.content.Context; @@ -47,6 +36,17 @@ import android.provider.Settings.Secure; import android.text.TextUtils; import android.util.Log; +import com.android.internal.content.PackageHelper; +import com.android.internal.telephony.BaseCommands; +import com.android.internal.telephony.Phone; +import com.android.internal.telephony.RILConstants; +import com.android.internal.util.XmlUtils; +import com.android.internal.widget.LockPatternUtils; +import com.android.internal.widget.LockPatternView; + +import org.xmlpull.v1.XmlPullParser; +import org.xmlpull.v1.XmlPullParserException; + import java.io.IOException; import java.util.HashSet; import java.util.List; @@ -63,7 +63,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 = 65; + private static final int DATABASE_VERSION = 66; private Context mContext; @@ -839,6 +839,28 @@ public class DatabaseHelper extends SQLiteOpenHelper { upgradeVersion = 65; } + if (upgradeVersion == 65) { + /* + * Animations are removed from Settings. Turned on by default + */ + db.beginTransaction(); + SQLiteStatement stmt = null; + try { + db.execSQL("DELETE FROM system WHERE name='" + + Settings.System.WINDOW_ANIMATION_SCALE + "'"); + db.execSQL("DELETE FROM system WHERE name='" + + Settings.System.TRANSITION_ANIMATION_SCALE + "'"); + stmt = db.compileStatement("INSERT INTO system(name,value)" + + " VALUES(?,?);"); + loadDefaultAnimationSettings(stmt); + db.setTransactionSuccessful(); + } finally { + db.endTransaction(); + if (stmt != null) stmt.close(); + } + upgradeVersion = 66; + } + // *** Remember to update DATABASE_VERSION above! if (upgradeVersion != currentVersion) { |