diff options
| author | 2011-05-17 09:55:53 -0700 | |
|---|---|---|
| committer | 2011-05-17 09:55:53 -0700 | |
| commit | 143c529f28bd49e077e4bc36ff30ed2ff7ffb838 (patch) | |
| tree | cb202f715412b1d2af2e63c741fdbe51c01bac46 | |
| parent | b45b21d13e3311c819d5fbd548ff8c859cc1dfe3 (diff) | |
| parent | 21f1d49f0eac47c1ebbabf82f145dc60f988d069 (diff) | |
am 21f1d49f: am a7f52d46: Merge "DO NOT MERGE Use action bar overflow menus on large configurations as well as xlarge." into honeycomb-mr2
* commit '21f1d49f0eac47c1ebbabf82f145dc60f988d069':
DO NOT MERGE Use action bar overflow menus on large configurations as well as xlarge.
| -rw-r--r-- | core/java/com/android/internal/view/menu/ActionMenuView.java | 5 | ||||
| -rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindow.java | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/core/java/com/android/internal/view/menu/ActionMenuView.java b/core/java/com/android/internal/view/menu/ActionMenuView.java index 7775f00a50a4..b49fdc596c29 100644 --- a/core/java/com/android/internal/view/menu/ActionMenuView.java +++ b/core/java/com/android/internal/view/menu/ActionMenuView.java @@ -88,9 +88,8 @@ public class ActionMenuView extends LinearLayout implements MenuBuilder.ItemInvo mMaxItems = getMaxActionButtons(); // TODO There has to be a better way to indicate that we don't have a hard menu key. - final int screen = res.getConfiguration().screenLayout; - mReserveOverflow = (screen & Configuration.SCREENLAYOUT_SIZE_MASK) == - Configuration.SCREENLAYOUT_SIZE_XLARGE; + final Configuration config = res.getConfiguration(); + mReserveOverflow = config.isLayoutSizeAtLeast(Configuration.SCREENLAYOUT_SIZE_LARGE); mWidthLimit = res.getDisplayMetrics().widthPixels / 2; TypedArray a = context.obtainStyledAttributes(com.android.internal.R.styleable.Theme); diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java index 64857edb3668..fc9502ce464b 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java @@ -450,12 +450,11 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { if (st.featureId == FEATURE_OPTIONS_PANEL) { Context context = getContext(); Configuration config = context.getResources().getConfiguration(); - boolean isXLarge = (config.screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) == - Configuration.SCREENLAYOUT_SIZE_XLARGE; boolean isHoneycombApp = context.getApplicationInfo().targetSdkVersion >= android.os.Build.VERSION_CODES.HONEYCOMB; - if (isXLarge && isHoneycombApp) { + if (isHoneycombApp && + config.isLayoutSizeAtLeast(Configuration.SCREENLAYOUT_SIZE_LARGE)) { return; } } |