diff options
author | Jim Miller <jaggies@google.com> | 2012-12-04 12:29:15 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-12-04 12:29:16 -0800 |
commit | 80a90efcbf32b30b886380c67585ddfb41c35437 (patch) | |
tree | 39ab2a166abeddeb3307501ee5b9cba2d2e75293 /policy | |
parent | b6b4f171ff38ccac833edb2a1ad7f725ed068d46 (diff) | |
parent | 147f9568afe645d9bfb91f3037f5336d8a2482cc (diff) | |
download | frameworks_base-80a90efcbf32b30b886380c67585ddfb41c35437.zip frameworks_base-80a90efcbf32b30b886380c67585ddfb41c35437.tar.gz frameworks_base-80a90efcbf32b30b886380c67585ddfb41c35437.tar.bz2 |
Merge "Fix ring volume issue by addressing focus regression in keyguard." into jb-mr1.1-dev
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java | 7 | ||||
-rw-r--r-- | policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java index 8502d78..94cd0b5 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java @@ -286,6 +286,11 @@ 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() { @@ -881,6 +886,7 @@ public class KeyguardHostView extends KeyguardViewBase { if (mViewStateManager != null) { mViewStateManager.showUsabilityHints(); } + requestFocus(); } @Override @@ -900,6 +906,7 @@ public class KeyguardHostView extends KeyguardViewBase { if (cameraPage != null) { cameraPage.onScreenTurnedOff(); } + clearFocus(); } public void clearAppWidgetToShow() { diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java index efd09e0..dac852a 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardViewManager.java @@ -216,6 +216,7 @@ public class KeyguardViewManager { if (force || mKeyguardView == null) { inflateKeyguardView(options); + mKeyguardView.requestFocus(); } updateUserActivityTimeoutInWindowLayoutParams(); mViewManager.updateViewLayout(mKeyguardHost, mWindowLayoutParams); |