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

Commit a166b7be authored by Arthur Hung's avatar Arthur Hung Committed by Automerger Merge Worker
Browse files

Merge "Fix CombinationKeyTests failure" into udc-dev am: be845d9e

parents 1a999d5a be845d9e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -395,7 +395,7 @@ public final class SingleKeyGestureDetector {

    private class KeyHandler extends Handler {
        KeyHandler() {
            super(Looper.getMainLooper());
            super(Looper.myLooper());
        }

        @Override
+9 −3
Original line number Diff line number Diff line
@@ -202,9 +202,11 @@ class TestPhoneWindowManager {
                    .canonicalToCurrentPackageNames(any());
        } catch (PackageManager.NameNotFoundException ignored) { }

        doReturn(mTelecomManager).when(mContext).getSystemService(eq(Context.TELECOM_SERVICE));
        doReturn(mNotificationManager).when(mContext)
                .getSystemService(eq(NotificationManager.class));
        doReturn(false).when(mTelecomManager).isInCall();
        doReturn(false).when(mTelecomManager).isRinging();
        doReturn(mTelecomManager).when(mPhoneWindowManager).getTelecommService();
        doNothing().when(mNotificationManager).silenceNotificationSound();
        doReturn(mNotificationManager).when(mPhoneWindowManager).getNotificationService();
        doReturn(mVibrator).when(mContext).getSystemService(eq(Context.VIBRATOR_SERVICE));

        final PowerManager.WakeLock wakeLock = mock(PowerManager.WakeLock.class);
@@ -235,6 +237,7 @@ class TestPhoneWindowManager {
        doNothing().when(mPhoneWindowManager).screenTurnedOn(anyInt());
        doNothing().when(mPhoneWindowManager).startedWakingUp(anyInt(), anyInt());
        doNothing().when(mPhoneWindowManager).finishedWakingUp(anyInt(), anyInt());
        doNothing().when(mPhoneWindowManager).lockNow(any());

        mPhoneWindowManager.init(new TestInjector(mContext, mWindowManagerFuncsImpl));
        mPhoneWindowManager.systemReady();
@@ -249,6 +252,7 @@ class TestPhoneWindowManager {
    void tearDown() {
        mHandlerThread.quitSafely();
        LocalServices.removeServiceForTest(InputMethodManagerInternal.class);
        Mockito.reset(mPhoneWindowManager);
        mMockitoSession.finishMocking();
    }

@@ -322,6 +326,7 @@ class TestPhoneWindowManager {

    void overrideDisplayState(int state) {
        doReturn(state).when(mDisplay).getState();
        doReturn(state == STATE_ON).when(mDisplayPolicy).isAwake();
        Mockito.reset(mPowerManager);
    }

@@ -388,6 +393,7 @@ class TestPhoneWindowManager {
    }

    void assertDreamRequest() {
        waitForIdle();
        verify(mDreamManagerInternal).requestDream();
    }