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

Commit 99b69286 authored by Craig Mautner's avatar Craig Mautner
Browse files

Show IME over keyguard if IME target is showing

IME was being hidden by keyguard even if the window it was attached
to was showing. This change shows the IME if the window it is
attached to is hiding the keyguard.

Also fix an NPE that was crashing systemui.

Fixes bug 16457525.

Change-Id: If587eefa7b1e0ae26713906a76c0766ebaae69a6
parent 0dedb722
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -134,6 +134,9 @@ public class WifiAccessPointController {
        final List<AccessPoint> aps = new ArrayList<AccessPoint>(scanResults.size());
        final ArraySet<String> ssids = new ArraySet<String>();
        for (ScanResult scanResult : scanResults) {
            if (scanResult == null) {
                continue;
            }
            final String ssid = scanResult.SSID;
            if (TextUtils.isEmpty(ssid) || ssids.contains(ssid)) continue;
            if (!configured.containsKey(ssid)) continue;
+6 −1
Original line number Diff line number Diff line
@@ -248,6 +248,10 @@ public class WindowAnimator {

        mForceHiding = KEYGUARD_NOT_SHOWN;

        final WindowState imeTarget = mService.mInputMethodTarget;
        final boolean showImeOverKeyguard = imeTarget != null && imeTarget.isVisibleNow() &&
                (imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0;

        for (int i = windows.size() - 1; i >= 0; i--) {
            WindowState win = windows.get(i);
            WindowStateAnimator winAnimator = win.mWinAnimator;
@@ -312,7 +316,8 @@ public class WindowAnimator {
                            + " hidden=" + win.mRootToken.hidden
                            + " anim=" + win.mWinAnimator.mAnimation);
                } else if (mPolicy.canBeForceHidden(win, win.mAttrs)) {
                    final boolean hideWhenLocked = (flags & FLAG_SHOW_WHEN_LOCKED) == 0;
                    final boolean hideWhenLocked = (flags & FLAG_SHOW_WHEN_LOCKED) == 0 &&
                            !(win.mIsImWindow && showImeOverKeyguard);
                    final boolean changed;
                    if (((mForceHiding == KEYGUARD_ANIMATING_IN)
                                && (!winAnimator.isAnimating() || hideWhenLocked))