diff options
| author | Jose Lima <joselima@google.com> | 2015-01-28 21:32:37 +0000 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2015-01-28 21:32:37 +0000 |
| commit | 43181fb72d12bbf4f89a015f5020229b6ee00aab (patch) | |
| tree | 17a87b91344172574b2e55cf1d856a37d357643c | |
| parent | e469fcddbc556e6241be23711bb9ae60fd90243c (diff) | |
| parent | 485f6a60e0182767d57a5ab08d6438124a69439e (diff) | |
am 4a40f7cc: Merge "Fix crash caused by disabling the Options panel on TVs" into lmp-mr1-dev automerge: 1f81973
automerge: 485f6a6
* commit '485f6a60e0182767d57a5ab08d6438124a69439e':
Fix crash caused by disabling the Options panel on TVs
| -rw-r--r-- | core/java/android/app/Activity.java | 4 | ||||
| -rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindow.java | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 74c468dda335..a09bca1021cd 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -3226,7 +3226,9 @@ public class Activity extends ContextThemeWrapper * Programmatically closes the most recently opened context menu, if showing. */ public void closeContextMenu() { - mWindow.closePanel(Window.FEATURE_CONTEXT_MENU); + if (mWindow.hasFeature(Window.FEATURE_CONTEXT_MENU)) { + mWindow.closePanel(Window.FEATURE_CONTEXT_MENU); + } } /** diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index 153b67baa6ed..1aa7366de0d3 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -3165,7 +3165,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { // If the user is chording a menu shortcut, release the chord since // this window lost focus - if (!hasWindowFocus && mPanelChordingKey != 0) { + if (hasFeature(FEATURE_OPTIONS_PANEL) && !hasWindowFocus && mPanelChordingKey != 0) { closePanel(FEATURE_OPTIONS_PANEL); } |
