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

Commit cedb3a7e authored by Kristian Monsen's avatar Kristian Monsen
Browse files

Clear the files we copy over to the temp cache

Fixes CTS tests

Change-Id: I3464ac90e58a9df21379a8da9d637f4f5ee69b85
parent 9f7e83b4
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -244,6 +244,9 @@ public final class CacheManager {
     * obtained from {@link android.webkit.CacheManager.CacheResult#getLocalPath}, this
     * identifies the cache file.
     *
     * Cache files are not guaranteed to be in this directory before
     * CacheManager#getCacheFile(String, Map<String, String>) is called.
     *
     * @return File The base directory of the cache.
     *
     * @deprecated Access to the HTTP cache will be removed in a future release.
@@ -611,8 +614,9 @@ public final class CacheManager {
            return true;
        }
        // delete rows in the cache database
        WebViewWorker.getHandler().sendEmptyMessage(
                WebViewWorker.MSG_CLEAR_CACHE);
        if (!JniUtil.useChromiumHttpStack())
            WebViewWorker.getHandler().sendEmptyMessage(WebViewWorker.MSG_CLEAR_CACHE);

        // delete cache files in a separate thread to not block UI.
        final Runnable clearCache = new Runnable() {
            public void run() {
+1 −1
Original line number Diff line number Diff line
@@ -1770,7 +1770,7 @@ final class WebViewCore {

    private void clearCache(boolean includeDiskFiles) {
        mBrowserFrame.clearCache();
        if (includeDiskFiles && !JniUtil.useChromiumHttpStack()) {
        if (includeDiskFiles) {
            CacheManager.removeAllCacheFiles();
        }
    }