am a1759cea: Merge "add eventlog message whenever sqlite reports db corruption error" into eclair

Merge commit 'a1759ceac2f56f1c83ad6d1bc38e30ece2bf99fd' into eclair-plus-aosp

* commit 'a1759ceac2f56f1c83ad6d1bc38e30ece2bf99fd':
  add eventlog message whenever sqlite reports db corruption error
This commit is contained in:
Vasu Nori
2010-01-08 16:33:50 -08:00
committed by Android Git Automerger

View 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();