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

Commit 2b57689d authored by Guang Zhu's avatar Guang Zhu Committed by Android (Google) Code Review
Browse files

Merge "call clearCache from UI thread"

parents 41701ac5 c1635bf1
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;