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

Commit 5b7058f4 authored by Wilson Wu's avatar Wilson Wu
Browse files

Fix keyboard remain after dismissing notification

We introduced mRemoteEditImeVisible checking in
RemoteInputController#removeRemoteInput by CL[1]
to resolve a IME layer issue.

Update this flag when remove notification to remove
the active remote input.

[1]: I7dbc8e656505f79b1bfb198c458d3b95a645c1cb

Fix: 183678882
Test: Manual test with bug flow
   1) Receive a chat notification
   2) Tap direct reply to show the keyboard
   3) Swipe to dismiss notification
   4) Verify the keyboard will be dismiss as expected
Test: atest NotificationRemoteInputManagerTest
Change-Id: I7c1af7f0f26906361aa29425fb77e94e5ed4cd12
parent 0abe7327
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -576,6 +576,7 @@ public class NotificationRemoteInputManager implements Dumpable {
            mKeysKeptForRemoteInputHistory.remove(key);
        }
        if (mRemoteInputController.isRemoteInputActive(entry)) {
            entry.mRemoteEditImeVisible = false;
            mRemoteInputController.removeRemoteInput(entry, null);
        }
    }
+1 −0
Original line number Diff line number Diff line
@@ -108,6 +108,7 @@ public class NotificationRemoteInputManagerTest extends SysuiTestCase {
        when(mController.isRemoteInputActive(mEntry)).thenReturn(true);
        mRemoteInputManager.onPerformRemoveNotification(mEntry, mEntry.getKey());

        assertFalse(mEntry.mRemoteEditImeVisible);
        verify(mController).removeRemoteInput(mEntry, null);
    }