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

Commit 68f2d5a8 authored by Riddle Hsu's avatar Riddle Hsu Committed by android-build-merger
Browse files

Merge "Fix crash of test after finishing RecentsAnimationTest" into qt-dev am:...

Merge "Fix crash of test after finishing RecentsAnimationTest" into qt-dev am: 0f106257 am: 79ae218b
am: 5e78e310

Change-Id: Ic84eee708e7f188cc5ec6ffb102600d3bebde350
parents 5cba3f80 5e78e310
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -585,7 +585,10 @@ class ActivityTestsBase {
        }
        }


        void tearDown() {
        void tearDown() {
            mHandlerThread.quitSafely();
            // Make sure there are no running messages and then quit the thread so the next test
            // won't be affected.
            mHandlerThread.getThreadHandler().runWithScissors(mHandlerThread::quit,
                    0 /* timeout */);
        }
        }
    }
    }


@@ -630,7 +633,8 @@ class ActivityTestsBase {
            mWindowManager = prepareMockWindowManager();
            mWindowManager = prepareMockWindowManager();
            mKeyguardController = mock(KeyguardController.class);
            mKeyguardController = mock(KeyguardController.class);


            // Do not schedule idle timeouts
            // Do not schedule idle that may touch methods outside the scope of the test.
            doNothing().when(this).scheduleIdleLocked();
            doNothing().when(this).scheduleIdleTimeoutLocked(any());
            doNothing().when(this).scheduleIdleTimeoutLocked(any());
            // unit test version does not handle launch wake lock
            // unit test version does not handle launch wake lock
            doNothing().when(this).acquireLaunchWakelock();
            doNothing().when(this).acquireLaunchWakelock();