Merge "Fix password field focus in keyguard" into jb-mr1.1-dev
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -153,11 +153,18 @@ public class KeyguardViewManager {
|
||||
|
||||
@Override
|
||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||
if (event.getAction() == KeyEvent.ACTION_DOWN && mKeyguardView != null) {
|
||||
int keyCode = event.getKeyCode();
|
||||
if (keyCode == KeyEvent.KEYCODE_BACK && mKeyguardView.handleBackKey()) {
|
||||
return true;
|
||||
} else if (keyCode == KeyEvent.KEYCODE_MENU && mKeyguardView.handleMenuKey()) {
|
||||
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;
|
||||
} else if (keyCode == KeyEvent.KEYCODE_MENU && mKeyguardView.handleMenuKey()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// Always process media keys, regardless of focus
|
||||
if (mKeyguardView.dispatchKeyEvent(event)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user