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

Commit 9819a617 authored by Jim Miller's avatar Jim Miller Committed by Android (Google) Code Review
Browse files

Merge "Fix password field focus in keyguard" into jb-mr1.1-dev

parents 0db59a85 42df15e9
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -287,11 +287,6 @@ public class KeyguardHostView extends KeyguardViewBase {

        showPrimarySecurityScreen(false);
        updateSecurityViews();

        // Make sure at least this view is focusable in case nothing below it is. Otherwise,
        // requestFocus() on this view will fail and allow events, such as volume keys, to be
        // handled by the fallback handler.  See bug 7546960 for details.
        setFocusableInTouchMode(true);
    }

    private boolean shouldEnableAddWidget() {
+12 −5
Original line number Diff line number Diff line
@@ -153,7 +153,9 @@ public class KeyguardViewManager {

        @Override
        public boolean dispatchKeyEvent(KeyEvent event) {
            if (event.getAction() == KeyEvent.ACTION_DOWN && mKeyguardView != null) {
            if (mKeyguardView != null) {
                // Always process back and menu keys, regardless of focus
                if (event.getAction() == KeyEvent.ACTION_DOWN) {
                    int keyCode = event.getKeyCode();
                    if (keyCode == KeyEvent.KEYCODE_BACK && mKeyguardView.handleBackKey()) {
                        return true;
@@ -161,6 +163,11 @@ public class KeyguardViewManager {
                        return true;
                    }
                }
                // Always process media keys, regardless of focus
                if (mKeyguardView.dispatchKeyEvent(event)) {
                    return true;
                }
            }
            return super.dispatchKeyEvent(event);
        }
    }