From 76070d1690ef9ba2675bdc34f1405968a2123112 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Thu, 19 Apr 2012 11:30:33 -0700 Subject: 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 --- core/java/android/database/sqlite/SQLiteConnection.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/java/android/database/sqlite') 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++) { -- cgit v1.1