OSDN Git Service

add eventlog message whenever sqlite reports db corruption error
authorVasu Nori <vnori@google.com>
Fri, 8 Jan 2010 18:11:24 +0000 (10:11 -0800)
committerVasu Nori <vnori@google.com>
Fri, 8 Jan 2010 18:11:24 +0000 (10:11 -0800)
core/java/android/database/sqlite/SQLiteDatabase.java

index f621483..9ebf5d9 100644 (file)
@@ -286,6 +286,7 @@ public class SQLiteDatabase extends SQLiteClosable {
             close();
         } finally {
             Log.e(TAG, "Removing corrupt database: " + mPath);
+            EventLog.writeEvent(EVENT_DB_CORRUPT, mPath);
             // Delete the corrupt file.  Don't re-create it now -- that would just confuse people
             // -- but the next time someone tries to open it, they can set it up from scratch.
             new File(mPath).delete();