I was looking at the JavaDoc for SQLiteOpenHelper and noticed the setWriteAheadLoggingEnabled(boolean)
method. The SQLiteOpenHelper doc suggest enabling write-ahead logging in a helper's onConfigure(SQLiteDatabase)
method.
Is there any difference between calling setWriteAheadLoggingEnabled(true)
on the helper, compared to calling enableWriteAheadLogging()
on the database instance that gets passed to onConfigure()
? Or is the API just redundant?
Update: Looking at the code for SQLiteDatabase and SQLiteOpenHelper, it appears that SQLiteOpenHelper.setWriteAheadLoggingEnabled(boolean)
just does some checks (that enableWriteAheadLogging()
and disableWriteAheadLogging()
already do) before calling the appropriate method.