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

Commit d64e82ce authored by Ming-Shin Lu's avatar Ming-Shin Lu
Browse files

Canoncial IME Target (2/N)

Introduce DisplayContent#getImeTarget to generic
getting IME target method in accordance with IME_TARGET_.* flag:
 - IME_TARGET_LAYERING => mInputMethodLayeringTarget
   (a.k.a mInputMethodTarget)
 - IME_TARGET_INPUT => mInputMethodInputTarget
 - IME_TARGET_CONTROL => mInputMethodControlTarget

Added setter for setting IME related targets, also makes the
IME target fields as private for ecapsulation.

Bug: 163453496
Test: atest WmTests
Test: atest DisplayContentTests

Change-Id: I3ad8bfec218de8708e372704ce9852053f7c8542
parent 3e839b73
Loading
Loading
Loading
Loading
+109 −44
Original line number Diff line number Diff line
@@ -546,24 +546,56 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
     * This just indicates the window the input method is on top of, not
     * necessarily the window its input is going to.
     */
    WindowState mInputMethodTarget;
    private WindowState mImeLayeringTarget;

    /**
     * The window which receives input from the input method. This is also a candidate of the
     * input method control target.
     */
    WindowState mInputMethodInputTarget;
    private WindowState mImeInputTarget;

    /**
     * This controls the visibility and animation of the input method window.
     */
    InsetsControlTarget mInputMethodControlTarget;
    private InsetsControlTarget mImeControlTarget;

    /**
     * Used by {@link #getImeTarget} to return the IME target which the input method window on
     * top of for adjusting input method window surface layer Z-Ordering.
     *
     * @see #mImeLayeringTarget
     */
    static final int IME_TARGET_LAYERING = 0;

    /**
     * Used by {@link #getImeTarget} to return the IME target which received the input connection
     * from IME.
     *
     * @see #mImeInputTarget
     */
    static final int IME_TARGET_INPUT = 1;

    /**
     * Used by {@link #getImeTarget} to return the IME target which controls the IME insets
     * visibility and animation.
     *
     * @see #mImeControlTarget
     */
    static final int IME_TARGET_CONTROL = 2;

    @IntDef(flag = false, prefix = { "IME_TARGET_" }, value = {
            IME_TARGET_LAYERING,
            IME_TARGET_INPUT,
            IME_TARGET_CONTROL,
    })
    @Retention(RetentionPolicy.SOURCE)
    @interface InputMethodTarget {}

    /** The surface parent of the IME container. */
    private SurfaceControl mInputMethodSurfaceParent;

    /** If true hold off on modifying the animation layer of mInputMethodTarget */
    boolean mInputMethodTargetWaitingAnim;
    /** If {@code true} hold off on modifying the animation layer of {@link #mImeLayeringTarget} */
    boolean mImeLayeringTargetWaitingAnim;

    private final PointerEventDispatcher mPointerEventDispatcher;

@@ -808,7 +840,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp

    private final Consumer<WindowState> mApplyPostLayoutPolicy =
            w -> getDisplayPolicy().applyPostLayoutPolicyLw(w, w.mAttrs, w.getParentWindow(),
                    mInputMethodTarget);
                    mImeLayeringTarget);

    private final Consumer<WindowState> mApplySurfaceChangesTransaction = w -> {
        final WindowSurfacePlacer surfacePlacer = mWmService.mWindowPlacerLocked;
@@ -2938,15 +2970,15 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
            proto.write(FOCUSED_ROOT_TASK_ID, INVALID_TASK_ID);
        }
        proto.write(DISPLAY_READY, isReady());
        if (mInputMethodTarget != null) {
            mInputMethodTarget.dumpDebug(proto, INPUT_METHOD_TARGET, logLevel);
        if (mImeLayeringTarget != null) {
            mImeLayeringTarget.dumpDebug(proto, INPUT_METHOD_TARGET, logLevel);
        }
        if (mInputMethodInputTarget != null) {
            mInputMethodInputTarget.dumpDebug(proto, INPUT_METHOD_INPUT_TARGET, logLevel);
        if (mImeInputTarget != null) {
            mImeInputTarget.dumpDebug(proto, INPUT_METHOD_INPUT_TARGET, logLevel);
        }
        if (mInputMethodControlTarget != null
                && mInputMethodControlTarget.getWindow() != null) {
            mInputMethodControlTarget.getWindow().dumpDebug(proto, INPUT_METHOD_CONTROL_TARGET,
        if (mImeControlTarget != null
                && mImeControlTarget.getWindow() != null) {
            mImeControlTarget.getWindow().dumpDebug(proto, INPUT_METHOD_CONTROL_TARGET,
                    logLevel);
        }
        if (mCurrentFocus != null) {
@@ -3202,7 +3234,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        boolean imWindowChanged = false;
        final WindowState imWindow = mInputMethodWindow;
        if (imWindow != null) {
            final WindowState prevTarget = mInputMethodTarget;
            final WindowState prevTarget = mImeLayeringTarget;
            final WindowState newTarget = computeImeTarget(true /* updateImeTarget*/);
            imWindowChanged = prevTarget != newTarget;

@@ -3443,7 +3475,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
    }

    /**
     * Determine and return the window that should be the IME target.
     * Determine and return the window that should be the IME target for layering the IME window.
     * @param updateImeTarget If true the system IME target will be updated to match what we found.
     * @return The window that should be used as the IME target or null if there isn't any.
     */
@@ -3452,13 +3484,13 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
            // There isn't an IME so there shouldn't be a target...That was easy!
            if (updateImeTarget) {
                if (DEBUG_INPUT_METHOD) Slog.w(TAG_WM, "Moving IM target from "
                        + mInputMethodTarget + " to null since mInputMethodWindow is null");
                setInputMethodTarget(null, mInputMethodTargetWaitingAnim);
                        + mImeLayeringTarget + " to null since mInputMethodWindow is null");
                setImeLayeringTarget(null, mImeLayeringTargetWaitingAnim);
            }
            return null;
        }

        final WindowState curTarget = mInputMethodTarget;
        final WindowState curTarget = mImeLayeringTarget;
        if (!canUpdateImeTarget()) {
            if (DEBUG_INPUT_METHOD) Slog.w(TAG_WM, "Defer updating IME target");
            return curTarget;
@@ -3513,7 +3545,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
                if (DEBUG_INPUT_METHOD) Slog.w(TAG_WM, "Moving IM target from " + curTarget
                        + " to null." + (SHOW_STACK_CRAWLS ? " Callers="
                        + Debug.getCallers(4) : ""));
                setInputMethodTarget(null, mInputMethodTargetWaitingAnim);
                setImeLayeringTarget(null, mImeLayeringTargetWaitingAnim);
            }

            return null;
@@ -3540,7 +3572,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
                    if (mAppTransition.isTransitionSet()) {
                        // If we are currently setting up for an animation, hold everything until we
                        // can find out what will happen.
                        setInputMethodTarget(highestTarget, true);
                        setImeLayeringTarget(highestTarget, true);
                        return highestTarget;
                    }
                }
@@ -3548,7 +3580,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp

            if (DEBUG_INPUT_METHOD) Slog.w(TAG_WM, "Moving IM target from " + curTarget + " to "
                    + target + (SHOW_STACK_CRAWLS ? " Callers=" + Debug.getCallers(4) : ""));
            setInputMethodTarget(target, false);
            setImeLayeringTarget(target, false);
        }

        return target;
@@ -3559,24 +3591,24 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
     * the candidate app window token if needed.
     */
    void computeImeTargetIfNeeded(ActivityRecord candidate) {
        if (mInputMethodTarget != null && mInputMethodTarget.mActivityRecord == candidate) {
        if (mImeLayeringTarget != null && mImeLayeringTarget.mActivityRecord == candidate) {
            computeImeTarget(true /* updateImeTarget */);
        }
    }

    private boolean isImeControlledByApp() {
        return mInputMethodInputTarget != null && !WindowConfiguration.isSplitScreenWindowingMode(
                        mInputMethodInputTarget.getWindowingMode());
        return mImeInputTarget != null && !WindowConfiguration.isSplitScreenWindowingMode(
                        mImeInputTarget.getWindowingMode());
    }

    boolean isImeAttachedToApp() {
        return isImeControlledByApp()
                && mInputMethodTarget != null
                && mInputMethodTarget.mActivityRecord != null
                && mInputMethodTarget.getWindowingMode() == WINDOWING_MODE_FULLSCREEN
                && mImeLayeringTarget != null
                && mImeLayeringTarget.mActivityRecord != null
                && mImeLayeringTarget.getWindowingMode() == WINDOWING_MODE_FULLSCREEN
                // An activity with override bounds should be letterboxed inside its parent bounds,
                // so it doesn't fill the screen.
                && mInputMethodTarget.mActivityRecord.matchParentBounds();
                && mImeLayeringTarget.mActivityRecord.matchParentBounds();
    }

    /**
@@ -3603,6 +3635,24 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        return statusBar != null ? statusBar : defaultDc.mRemoteInsetsControlTarget;
    }

    /**
     * Returns the corresponding IME insets control target according the IME target type.
     *
     * @param type The type of the IME target.
     * @see #IME_TARGET_LAYERING
     * @see #IME_TARGET_INPUT
     * @see #IME_TARGET_CONTROL
     */
    InsetsControlTarget getImeTarget(@InputMethodTarget int type) {
        switch (type) {
            case IME_TARGET_LAYERING: return mImeLayeringTarget;
            case IME_TARGET_INPUT: return mImeInputTarget;
            case IME_TARGET_CONTROL: return mImeControlTarget;
            default:
                return null;
        }
    }

    @DisplayImePolicy int getImePolicy() {
        if (!isTrusted()) {
            return DISPLAY_IME_POLICY_FALLBACK_DISPLAY;
@@ -3620,6 +3670,11 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        return mWmService.mForceDesktopModeOnExternalDisplays && !isDefaultDisplay && !isPrivate();
    }

    @VisibleForTesting
    void setImeLayeringTarget(WindowState target) {
        mImeLayeringTarget = target;
    }

    /**
     * Sets the window the IME is on top of.
     * @param target window to place the IME surface on top of. If {@code null}, the IME will be
@@ -3627,13 +3682,13 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
     * @param targetWaitingAnim if {@code true}, hold off on modifying the animation layer of
     *                          the target.
     */
    private void setInputMethodTarget(@Nullable WindowState target, boolean targetWaitingAnim) {
        if (target == mInputMethodTarget && mInputMethodTargetWaitingAnim == targetWaitingAnim) {
    private void setImeLayeringTarget(@Nullable WindowState target, boolean targetWaitingAnim) {
        if (target == mImeLayeringTarget && mImeLayeringTargetWaitingAnim == targetWaitingAnim) {
            return;
        }
        ProtoLog.i(WM_DEBUG_IME, "setInputMethodTarget %s", target);
        mInputMethodTarget = target;
        mInputMethodTargetWaitingAnim = targetWaitingAnim;
        mImeLayeringTarget = target;
        mImeLayeringTargetWaitingAnim = targetWaitingAnim;

        // 1. Reparent the IME container window to the target root DA to get the correct bounds and
        // config. (Only happens when the target window is in a different root DA)
@@ -3655,23 +3710,33 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        updateImeControlTarget();
    }

    @VisibleForTesting
    void setImeInputTarget(WindowState target) {
        mImeInputTarget = target;
    }

    @VisibleForTesting
    void setImeControlTarget(InsetsControlTarget target) {
        mImeControlTarget = target;
    }

    /**
     * The IME input target is the window which receives input from IME. It is also a candidate
     * which controls the visibility and animation of the input method window.
     */
    void setInputMethodInputTarget(WindowState target) {
        if (mInputMethodInputTarget != target) {
    void updateImeInputAndControlTarget(WindowState target) {
        if (mImeInputTarget != target) {
            ProtoLog.i(WM_DEBUG_IME, "setInputMethodInputTarget %s", target);
            mInputMethodInputTarget = target;
            mImeInputTarget = target;
            updateImeControlTarget();
        }
    }

    void updateImeControlTarget() {
        mInputMethodControlTarget = computeImeControlTarget();
        mInsetsStateController.onImeControlTargetChanged(mInputMethodControlTarget);
        mImeControlTarget = computeImeControlTarget();
        mInsetsStateController.onImeControlTargetChanged(mImeControlTarget);

        final WindowState win = InsetsControlTarget.asWindowOrNull(mInputMethodControlTarget);
        final WindowState win = InsetsControlTarget.asWindowOrNull(mImeControlTarget);
        final IBinder token = win != null ? win.mClient.asBinder() : null;
        // Note: not allowed to call into IMMS with the WM lock held, hence the post.
        mWmService.mH.post(() ->
@@ -3694,12 +3759,12 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
    @VisibleForTesting
    InsetsControlTarget computeImeControlTarget() {
        if (!isImeControlledByApp() && mRemoteInsetsControlTarget != null
                || (mInputMethodInputTarget != null
                        && getImeHostOrFallback(mInputMethodInputTarget.getWindow())
                || (mImeInputTarget != null
                        && getImeHostOrFallback(mImeInputTarget.getWindow())
                                == mRemoteInsetsControlTarget)) {
            return mRemoteInsetsControlTarget;
        } else {
            return mInputMethodInputTarget;
            return mImeInputTarget;
        }
    }

@@ -3716,7 +3781,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        // screen. If it's not covering the entire screen the IME might extend beyond the apps
        // bounds.
        if (allowAttachToApp && isImeAttachedToApp()) {
            return mInputMethodTarget.mActivityRecord.getSurfaceControl();
            return mImeLayeringTarget.mActivityRecord.getSurfaceControl();
        }

        // Otherwise, we just attach it to where the display area policy put it.
@@ -4337,7 +4402,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
        private boolean skipImeWindowsDuringTraversal(DisplayContent dc) {
            // We skip IME windows so they're processed just above their target, except
            // in split-screen mode where we process the IME containers above the docked divider.
            return dc.mInputMethodTarget != null
            return dc.getImeTarget(IME_TARGET_LAYERING) != null
                    && !dc.getDefaultTaskDisplayArea().isSplitScreenModeActivated();
        }

@@ -4452,7 +4517,7 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
    @Override
    void assignChildLayers(SurfaceControl.Transaction t) {
        mImeWindowsContainers.setNeedsLayer();
        final WindowState imeTarget = mInputMethodTarget;
        final WindowState imeTarget = mImeLayeringTarget;
        // In the case where we have an IME target that is not in split-screen mode IME
        // assignment is easy. We just need the IME to go directly above the target. This way
        // children of the target will naturally go above the IME and everyone is happy.
+7 −4
Original line number Diff line number Diff line
@@ -19,6 +19,9 @@ package com.android.server.wm;
import static android.os.Trace.TRACE_TAG_WINDOW_MANAGER;

import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_IME;
import static com.android.server.wm.DisplayContent.IME_TARGET_CONTROL;
import static com.android.server.wm.DisplayContent.IME_TARGET_INPUT;
import static com.android.server.wm.DisplayContent.IME_TARGET_LAYERING;
import static com.android.server.wm.ImeInsetsSourceProviderProto.IME_TARGET_FROM_IME;
import static com.android.server.wm.ImeInsetsSourceProviderProto.INSETS_SOURCE_PROVIDER;
import static com.android.server.wm.ImeInsetsSourceProviderProto.IS_IME_LAYOUT_DRAWN;
@@ -75,7 +78,7 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider {
            ProtoLog.d(WM_DEBUG_IME, "Run showImeRunner");
            // Target should still be the same.
            if (isReadyToShowIme()) {
                final InsetsControlTarget target = mDisplayContent.mInputMethodControlTarget;
                final InsetsControlTarget target = mDisplayContent.getImeTarget(IME_TARGET_CONTROL);

                ProtoLog.i(WM_DEBUG_IME, "call showInsets(ime) on %s",
                        target.getWindow() != null ? target.getWindow().getName() : "");
@@ -130,7 +133,7 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider {
        // Also, if imeTarget is closing, it would be considered as outdated target.
        // TODO(b/139861270): Remove the child & sublayer check once IMMS is aware of
        //  actual IME target.
        final InsetsControlTarget dcTarget = mDisplayContent.mInputMethodTarget;
        final InsetsControlTarget dcTarget = mDisplayContent.getImeTarget(IME_TARGET_LAYERING);
        if (dcTarget == null || mImeRequester == null) {
            return false;
        }
@@ -165,11 +168,11 @@ final class ImeInsetsSourceProvider extends InsetsSourceProvider {
    }

    private boolean isImeInputTarget(InsetsControlTarget target) {
        return target == mDisplayContent.mInputMethodInputTarget;
        return target == mDisplayContent.getImeTarget(IME_TARGET_INPUT);
    }

    private boolean sameAsImeControlTarget() {
        final InsetsControlTarget target = mDisplayContent.mInputMethodControlTarget;
        final InsetsControlTarget target = mDisplayContent.getImeTarget(IME_TARGET_CONTROL);
        return target == mImeRequester
                && (mImeRequester.getWindow() == null
                || !mImeRequester.getWindow().isClosing());
+3 −2
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;

import static com.android.internal.protolog.ProtoLogGroup.WM_DEBUG_WINDOW_ORGANIZER;
import static com.android.server.wm.DisplayContent.IME_TARGET_LAYERING;
import static com.android.server.wm.WindowOrganizerController.CONTROLLABLE_CONFIGS;
import static com.android.server.wm.WindowOrganizerController.CONTROLLABLE_WINDOW_CONFIGS;

@@ -579,11 +580,11 @@ class TaskOrganizerController extends ITaskOrganizerController.Stub {
            synchronized (mGlobalLock) {
                DisplayContent dc = mService.mWindowManager.mRoot
                        .getDisplayContent(displayId);
                if (dc == null || dc.mInputMethodTarget == null) {
                if (dc == null || dc.getImeTarget(IME_TARGET_LAYERING) == null) {
                    return null;
                }
                // Avoid WindowState#getRootTask() so we don't attribute system windows to a task.
                final Task task = dc.mInputMethodTarget.getTask();
                final Task task = dc.getImeTarget(IME_TARGET_LAYERING).getWindow().getTask();
                if (task == null) {
                    return null;
                }
+22 −19
Original line number Diff line number Diff line
@@ -104,6 +104,9 @@ import static com.android.internal.util.LatencyTracker.ACTION_ROTATE_SCREEN;
import static com.android.server.LockGuard.INDEX_WINDOW;
import static com.android.server.LockGuard.installLock;
import static com.android.server.policy.WindowManagerPolicy.FINISH_LAYOUT_REDO_WALLPAPER;
import static com.android.server.wm.DisplayContent.IME_TARGET_CONTROL;
import static com.android.server.wm.DisplayContent.IME_TARGET_INPUT;
import static com.android.server.wm.DisplayContent.IME_TARGET_LAYERING;
import static com.android.server.wm.WindowContainer.AnimationFlags.CHILDREN;
import static com.android.server.wm.WindowContainer.AnimationFlags.PARENTS;
import static com.android.server.wm.WindowContainer.AnimationFlags.TRANSITION;
@@ -6267,20 +6270,20 @@ public class WindowManagerService extends IWindowManager.Stub
        mRoot.dumpTopFocusedDisplayId(pw);
        mRoot.forAllDisplays(dc -> {
            final int displayId = dc.getDisplayId();
            final WindowState inputMethodTarget = dc.mInputMethodTarget;
            final WindowState inputMethodInputTarget = dc.mInputMethodInputTarget;
            final InsetsControlTarget inputMethodControlTarget = dc.mInputMethodControlTarget;
            if (inputMethodTarget != null) {
                pw.print("  mInputMethodTarget in display# "); pw.print(displayId);
                pw.print(' '); pw.println(inputMethodTarget);
            final InsetsControlTarget imeLayeringTarget = dc.getImeTarget(IME_TARGET_LAYERING);
            final InsetsControlTarget imeInputTarget = dc.getImeTarget(IME_TARGET_INPUT);
            final InsetsControlTarget imeControlTarget = dc.getImeTarget(IME_TARGET_CONTROL);
            if (imeLayeringTarget != null) {
                pw.print("  imeLayeringTarget in display# "); pw.print(displayId);
                pw.print(' '); pw.println(imeLayeringTarget);
            }
            if (inputMethodInputTarget != null) {
                pw.print("  mInputMethodInputTarget in display# "); pw.print(displayId);
                pw.print(' '); pw.println(inputMethodInputTarget);
            if (imeInputTarget != null) {
                pw.print("  imeInputTarget in display# "); pw.print(displayId);
                pw.print(' '); pw.println(imeInputTarget);
            }
            if (inputMethodControlTarget != null) {
                pw.print("  inputMethodControlTarget in display# "); pw.print(displayId);
                pw.print(' '); pw.println(inputMethodControlTarget);
            if (imeControlTarget != null) {
                pw.print("  imeControlTarget in display# "); pw.print(displayId);
                pw.print(' '); pw.println(imeControlTarget);
            }
        });
        pw.print("  mInTouchMode="); pw.println(mInTouchMode);
@@ -7575,7 +7578,7 @@ public class WindowManagerService extends IWindowManager.Stub
            synchronized (mGlobalLock) {
                final WindowState imeTarget = mWindowMap.get(imeTargetWindowToken);
                if (imeTarget != null) {
                    imeTarget.getDisplayContent().setInputMethodInputTarget(imeTarget);
                    imeTarget.getDisplayContent().updateImeInputAndControlTarget(imeTarget);
                }
            }
        }
@@ -7718,10 +7721,10 @@ public class WindowManagerService extends IWindowManager.Stub
                    // requested to be hidden.
                    dc.getInsetsStateController().getImeSourceProvider().abortShowImePostLayout();
                }
                if (dc != null && dc.mInputMethodControlTarget != null) {
                if (dc != null && dc.getImeTarget(IME_TARGET_CONTROL) != null) {
                    ProtoLog.d(WM_DEBUG_IME, "hideIme Control target: %s ",
                            dc.mInputMethodControlTarget);
                    dc.mInputMethodControlTarget.hideInsets(
                            dc.getImeTarget(IME_TARGET_CONTROL));
                    dc.getImeTarget(IME_TARGET_CONTROL).hideInsets(
                            WindowInsets.Type.ime(), true /* fromIme */);
                }
                if (dc != null) {
@@ -7845,7 +7848,7 @@ public class WindowManagerService extends IWindowManager.Stub
                if (dc == null) {
                    return null;
                }
                final InsetsControlTarget target = dc.mInputMethodControlTarget;
                final InsetsControlTarget target = dc.getImeTarget(IME_TARGET_CONTROL);
                if (target == null) {
                    return null;
                }
@@ -7858,10 +7861,10 @@ public class WindowManagerService extends IWindowManager.Stub
        public String getImeTargetNameForLogging(int displayId) {
            synchronized (mGlobalLock) {
                final DisplayContent dc = mRoot.getDisplayContent(displayId);
                if (dc == null) {
                if (dc == null || dc.getImeTarget(IME_TARGET_LAYERING) == null) {
                    return null;
                }
                return dc.mInputMethodTarget != null ? dc.mInputMethodTarget.getName() : null;
                return dc.getImeTarget(IME_TARGET_LAYERING).getWindow().getName();
            }
        }
    }
+32 −19

File changed.

Preview size limit exceeded, changes collapsed.

Loading