Merge "Fix crash caused by disabling the Options panel on TVs" into lmp-mr1-dev
automerge: 1f81973
* commit '1f81973e7d33f2a3f4b0a0e232854283f0f18030':
Fix crash caused by disabling the Options panel on TVs
This commit is contained in:
@@ -3230,7 +3230,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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user