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

Commit 4d47bee1 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Clean up ImeVisibilityStateComputer a bit

As a preparation before making ImeVisibilityStateComputer multi-user
aware, this CL simplifies ImeVisibilityStateComputer and its test a
bit.

There must be no behavior change.

Bug: 349904272
Flag: EXEMPT refactor
Test: atest FrameworksInputMethodSystemServerTests
Change-Id: Ia1f363f8e4efba17561812e36462cf13a1853597
parent 24fdc0a1
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -227,7 +227,6 @@ public final class ImeVisibilityStateComputer {
                                ? overlayWindowToken : null;
                synchronized (ImfLock.class) {
                    mCurVisibleImeLayeringOverlay = overlay;

                }
            }

@@ -577,7 +576,6 @@ public final class ImeVisibilityStateComputer {
    }

    @GuardedBy("ImfLock.class")
    @VisibleForTesting
    ImeVisibilityResult onInteractiveChanged(IBinder windowToken, boolean interactive) {
        final ImeTargetWindowState state = getWindowStateOrNull(windowToken);
        if (state != null && state.isRequestedImeVisible() && mInputShown && !interactive) {
+2 −4
Original line number Diff line number Diff line
@@ -311,10 +311,8 @@ public class ImeVisibilityStateComputerTest extends InputMethodManagerServiceTes
            final ArgumentCaptor<IBinder> targetCaptor = ArgumentCaptor.forClass(IBinder.class);
            final ArgumentCaptor<ImeVisibilityResult> resultCaptor = ArgumentCaptor.forClass(
                    ImeVisibilityResult.class);
            synchronized (ImfLock.class) {
            verify(mInputMethodManagerService).onApplyImeVisibilityFromComputerLocked(
                    targetCaptor.capture(), notNull() /* statsToken */, resultCaptor.capture());
            }
            final IBinder imeInputTarget = targetCaptor.getValue();
            final ImeVisibilityResult result = resultCaptor.getValue();