OSDN Git Service

Handle the IllegalStateException
authorSunny Shao <sunnyshao@google.com>
Mon, 25 Feb 2019 12:21:46 +0000 (20:21 +0800)
committerSunny Shao <sunnyshao@google.com>
Tue, 26 Feb 2019 09:51:17 +0000 (17:51 +0800)
Handle the attempt to re-open an already-closed object: SQLiteDatabase problem

Bug: 124451874
Test: robotest
Change-Id: I750b2ce98cc2551c80c3bb4f25928e0e5a615cd9

src/com/android/settings/slices/SlicesIndexer.java

index ec2be29..1b3a25e 100644 (file)
@@ -71,7 +71,7 @@ class SlicesIndexer implements Runnable {
         long startTime = System.currentTimeMillis();
         database.beginTransaction();
         try {
-            mHelper.reconstruct(mHelper.getWritableDatabase());
+            mHelper.reconstruct(database);
             List<SliceData> indexData = getSliceData();
             insertSliceData(database, indexData);