diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-04-19 11:30:33 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-04-19 11:30:33 -0700 |
commit | 76070d1690ef9ba2675bdc34f1405968a2123112 (patch) | |
tree | 2f7f9b9e4b6c5850cbaa7dccd46307dbedbd0002 /core/java | |
parent | 61c08240585a6186b4bd879d87f238b3efc368f8 (diff) | |
download | frameworks_base-76070d1690ef9ba2675bdc34f1405968a2123112.zip frameworks_base-76070d1690ef9ba2675bdc34f1405968a2123112.tar.gz frameworks_base-76070d1690ef9ba2675bdc34f1405968a2123112.tar.bz2 |
Ensure that db connection reconfiguration can change the db.
If the db connection had been marked read-only, then certain
operations performed during reconfiguration, such as setting the
locale, could fail. So we need to make sure to clear the
read-only flag ahead of time.
Bug: 6296752
Change-Id: I98e19aff6386497b7fc321e04ca560fc1817a781
Diffstat (limited to 'core/java')
-rw-r--r-- | core/java/android/database/sqlite/SQLiteConnection.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/database/sqlite/SQLiteConnection.java b/core/java/android/database/sqlite/SQLiteConnection.java index 04f6377..acdc488 100644 --- a/core/java/android/database/sqlite/SQLiteConnection.java +++ b/core/java/android/database/sqlite/SQLiteConnection.java @@ -390,6 +390,8 @@ public final class SQLiteConnection implements CancellationSignal.OnCancelListen // Called by SQLiteConnectionPool only. void reconfigure(SQLiteDatabaseConfiguration configuration) { + mOnlyAllowReadOnlyOperations = false; + // Register custom functions. final int functionCount = configuration.customFunctions.size(); for (int i = 0; i < functionCount; i++) { |