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

Commit c1635bf1 authored by Guang Zhu's avatar Guang Zhu
Browse files

call clearCache from UI thread

according to the warning message, WebView#clearCache now should be
invoked from UI thread only

Change-Id: I089d9dcdcccc353b802a628c539e62f001d361f8
parent 9516aee4
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ public class LoadTestsAutoTest extends ActivityInstrumentationTestCase2<TestShel
            throw new RuntimeException("No test specified");
        }

        TestShellActivity activity = (TestShellActivity) getActivity();
        final TestShellActivity activity = (TestShellActivity) getActivity();

        Log.v(LOGTAG, "About to run tests, calling gc first...");
        freeMem();
@@ -109,7 +109,13 @@ public class LoadTestsAutoTest extends ActivityInstrumentationTestCase2<TestShel
        runTestAndWaitUntilDone(activity, runner.mTestPath, runner.mTimeoutInMillis,
                runner.mGetDrawTime, runner.mSaveImagePath);

        getInstrumentation().runOnMainSync(new Runnable() {

            @Override
            public void run() {
                activity.clearCache();
            }
        });
        if (mForwardServer != null) {
            mForwardServer.stop();
            mForwardServer = null;