diff options
author | Vasu Nori <vnori@google.com> | 2010-04-16 14:24:57 -0700 |
---|---|---|
committer | Vasu Nori <vnori@google.com> | 2010-04-16 14:24:57 -0700 |
commit | 0dbb9cee58d35d30f205dc844a82e960149fa86b (patch) | |
tree | 271c8b67e731aa607aef13ceffb0c17642c68a28 /core/java/android/database | |
parent | f066611aab5758b7b2a6b4a525e3f85aa813064a (diff) | |
download | frameworks_base-0dbb9cee58d35d30f205dc844a82e960149fa86b.zip frameworks_base-0dbb9cee58d35d30f205dc844a82e960149fa86b.tar.gz frameworks_base-0dbb9cee58d35d30f205dc844a82e960149fa86b.tar.bz2 |
accept close() on database objects even if the database is closed
bug:2602878
Change-Id: I3075f801ef35d72792ff3daaa1e887e53b58f5f8
Diffstat (limited to 'core/java/android/database')
-rw-r--r-- | core/java/android/database/sqlite/SQLiteCompiledSql.java | 3 | ||||
-rw-r--r-- | core/java/android/database/sqlite/SQLiteProgram.java | 2 |
2 files changed, 1 insertions, 4 deletions
diff --git a/core/java/android/database/sqlite/SQLiteCompiledSql.java b/core/java/android/database/sqlite/SQLiteCompiledSql.java index 047e176..25aa9b3 100644 --- a/core/java/android/database/sqlite/SQLiteCompiledSql.java +++ b/core/java/android/database/sqlite/SQLiteCompiledSql.java @@ -96,9 +96,6 @@ import android.util.Log; } /* package */ void releaseSqlStatement() { - if (!mDatabase.isOpen()) { - throw new IllegalStateException("database " + mDatabase.getPath() + " already closed"); - } // Note that native_finalize() checks to make sure that nStatement is // non-null before destroying it. if (nStatement != 0) { diff --git a/core/java/android/database/sqlite/SQLiteProgram.java b/core/java/android/database/sqlite/SQLiteProgram.java index 5f13eb1..89a5f0d 100644 --- a/core/java/android/database/sqlite/SQLiteProgram.java +++ b/core/java/android/database/sqlite/SQLiteProgram.java @@ -286,7 +286,7 @@ public abstract class SQLiteProgram extends SQLiteClosable { */ public void close() { if (!mDatabase.isOpen()) { - throw new IllegalStateException("database " + mDatabase.getPath() + " already closed"); + return; } mDatabase.lock(); try { |