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

Commit 17780378 authored by Wilson Wu's avatar Wilson Wu
Browse files

Add HIDE_REMOVE_CLIENT into InputMethodDebug

CL [1] introduced the HIDE_REMOVE_CLIENT reason in
SoftInputShowHideReason.

Add this reason into InputMethodDebug to avoid dump
unknown reason unexpectedly.

[1]: Ifb91111f7136952462678ff6d0a5e917abb5005e

Bug: 167780081
Test: atest InputMethodDebugTest
Change-Id: I23a8deea66600e3e31bdcb5fbf8fb87d91c57e4d
parent 1346575e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -226,6 +226,8 @@ public final class InputMethodDebug {
                return "HIDE_RECENTS_ANIMATION";
            case SoftInputShowHideReason.HIDE_SAME_WINDOW_FOCUSED_WITHOUT_EDITOR:
                return "HIDE_SAME_WINDOW_FOCUSED_WITHOUT_EDITOR";
            case SoftInputShowHideReason.HIDE_REMOVE_CLIENT:
                return "HIDE_REMOVE_CLIENT";
            default:
                return "Unknown=" + reason;
        }
+8 −0
Original line number Diff line number Diff line
@@ -65,4 +65,12 @@ public class InputMethodDebugTest {
                InputMethodDebug.startInputFlagsToString(
                        StartInputFlags.VIEW_HAS_FOCUS | StartInputFlags.INITIAL_CONNECTION));
    }

    @Test
    public void testSoftInputDisplayReasonToString() {
        // TODO: add more tests
        assertEquals("HIDE_REMOVE_CLIENT",
                InputMethodDebug.softInputDisplayReasonToString(
                        SoftInputShowHideReason.HIDE_REMOVE_CLIENT));
    }
}