diff options
author | Adam Powell <adamp@google.com> | 2010-08-10 15:59:40 -0700 |
---|---|---|
committer | Adam Powell <adamp@google.com> | 2010-08-10 15:59:40 -0700 |
commit | f75eeb28def26798682748aa5dedabebac86bb6a (patch) | |
tree | 6f5be9ba47e90cf9bf775edc9ba024b58074fa7f /policy | |
parent | f0cfe3438aea77b5193d94fb9fa0c8d37972b194 (diff) | |
download | frameworks_base-f75eeb28def26798682748aa5dedabebac86bb6a.zip frameworks_base-f75eeb28def26798682748aa5dedabebac86bb6a.tar.gz frameworks_base-f75eeb28def26798682748aa5dedabebac86bb6a.tar.bz2 |
Fix bug 2908822 - open/closePanel should do the right thing with ActionBars
Change-Id: Ic77f9dee864d17046f69c78a1e6d96a49b5c6180
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindow.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index 73fa93c..8a6428b 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -406,7 +406,12 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { @Override public final void openPanel(int featureId, KeyEvent event) { - openPanel(getPanelState(featureId, true), event); + if (featureId == FEATURE_OPTIONS_PANEL && mActionBar != null && + mActionBar.isOverflowReserved()) { + mActionBar.showOverflowMenu(); + } else { + openPanel(getPanelState(featureId, true), event); + } } private void openPanel(PanelFeatureState st, KeyEvent event) { @@ -497,7 +502,10 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { @Override public final void closePanel(int featureId) { - if (featureId == FEATURE_CONTEXT_MENU) { + if (featureId == FEATURE_OPTIONS_PANEL && mActionBar != null && + mActionBar.isOverflowReserved()) { + mActionBar.hideOverflowMenu(); + } else if (featureId == FEATURE_CONTEXT_MENU) { closeContextMenu(); } else { closePanel(getPanelState(featureId, true), true); |