public void setWriteAheadLoggingEnabled ( boolean enabled ) { synchronized ( this ) { if ( mEnableWriteAheadLogging != enabled ) { if ( mDatabase != null && mDatabase . isOpen ( ) && ! mDatabase . isReadOnly ( ) ) { if ( enabled ) { mDatabase . enableWriteAheadLogging ( ) ; } else { mDatabase . disableWriteAheadLogging ( ) ; } } mEnableWriteAheadLogging = enabled ; } } }
Enables or disables the use of write - ahead logging for the database .