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

Commit 45c348c4 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Merge "Enable IME on Keyguard Password security challenge" into rvc-dev...

Merge "Merge "Enable IME on Keyguard Password security challenge" into rvc-dev am: 965b250b am: c3be4b99" into rvc-d1-dev-plus-aosp am: d71f5b1b

Change-Id: I9801d83784b7bd11268b21ffd43023c3a0f9545f
parents f89b01b8 d71f5b1b
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -205,6 +205,9 @@ public class CarKeyguardViewController extends OverlayViewController implements

    @Override
    public void onCancelClicked() {
        getOverlayViewGlobalStateController().setWindowFocusable(/* focusable= */ false);
        getOverlayViewGlobalStateController().setWindowNeedsInput(/* needsInput= */ false);

        mBouncer.hide(/* destroyView= */ true);
        mKeyguardCancelClickedListener.onCancelClicked();
    }
@@ -226,7 +229,8 @@ public class CarKeyguardViewController extends OverlayViewController implements

    @Override
    public void setNeedsInput(boolean needsInput) {
        getLayout().setFocusable(needsInput);
        getOverlayViewGlobalStateController().setWindowFocusable(needsInput);
        getOverlayViewGlobalStateController().setWindowNeedsInput(needsInput);
    }

    /**
+6 −0
Original line number Diff line number Diff line
@@ -123,6 +123,12 @@ public class OverlayViewGlobalStateController {
        mSystemUIOverlayWindowController.setWindowFocusable(focusable);
    }

    /** Sets the {@link android.view.WindowManager.LayoutParams#FLAG_ALT_FOCUSABLE_IM} flag of the
     * sysui overlay window */
    public void setWindowNeedsInput(boolean needsInput) {
        mSystemUIOverlayWindowController.setWindowNeedsInput(needsInput);
    }

    /** Returns {@code true} if the window is focusable. */
    public boolean isWindowFocusable() {
        return mSystemUIOverlayWindowController.isWindowFocusable();
+10 −0
Original line number Diff line number Diff line
@@ -132,6 +132,16 @@ public class SystemUIOverlayWindowController implements
        updateWindow();
    }

    /** Sets the window to enable IME. */
    public void setWindowNeedsInput(boolean needsInput) {
        if (needsInput) {
            mLpChanged.flags &= ~WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
        } else {
            mLpChanged.flags |= WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM;
        }
        updateWindow();
    }

    /** Returns {@code true} if the window is visible */
    public boolean isWindowVisible() {
        return mVisible;