Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d5208cf4 authored by Leon Scroggins's avatar Leon Scroggins Committed by Android (Google) Code Review
Browse files

Merge "Enable write ahead logging on databases used by WebView." into honeycomb

parents f2e48873 09eac425
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -223,6 +223,7 @@ public class WebViewDatabase {
                        null);
            }
        }
        mDatabase.enableWriteAheadLogging();

        // mDatabase should not be null,
        // the only case is RequestAPI test has problem to create db
@@ -233,7 +234,7 @@ public class WebViewDatabase {
        }

        if (mDatabase.getVersion() != DATABASE_VERSION) {
            mDatabase.beginTransaction();
            mDatabase.beginTransactionNonExclusive();
            try {
                upgradeDatabase();
                mDatabase.setTransactionSuccessful();
@@ -261,6 +262,7 @@ public class WebViewDatabase {
                        CACHE_DATABASE_FILE, 0, null);
            }
        }
        mCacheDatabase.enableWriteAheadLogging();

        // mCacheDatabase should not be null,
        // the only case is RequestAPI test has problem to create db
@@ -271,7 +273,7 @@ public class WebViewDatabase {
        }

        if (mCacheDatabase.getVersion() != CACHE_DATABASE_VERSION) {
            mCacheDatabase.beginTransaction();
            mCacheDatabase.beginTransactionNonExclusive();
            try {
                upgradeCacheDatabase();
                bootstrapCacheDatabase();
@@ -648,7 +650,7 @@ public class WebViewDatabase {
                        + "WebViewWorkerThread instead of from "
                        + Thread.currentThread().getName());
            }
            mCacheDatabase.beginTransaction();
            mCacheDatabase.beginTransactionNonExclusive();
            return true;
        }
        return false;