Merge "Fix bug 3360882 - Allow FEATURE_CUSTOM_TITLE and FEATURE_ACTION_MODE_OVERLAY to coexist." into honeycomb

This commit is contained in:
Adam Powell
2011-01-16 19:58:51 -08:00
committed by Android (Google) Code Review
3 changed files with 14 additions and 8 deletions

View File

@@ -197,7 +197,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
/* Another feature is enabled and the user is trying to enable the custom title feature */
throw new AndroidRuntimeException("You cannot combine custom titles with other title features");
}
if (((features & (1 << FEATURE_CUSTOM_TITLE)) != 0) && (featureId != FEATURE_CUSTOM_TITLE)) {
if (((features & (1 << FEATURE_CUSTOM_TITLE)) != 0) &&
(featureId != FEATURE_CUSTOM_TITLE) && (featureId != FEATURE_ACTION_MODE_OVERLAY)) {
/* Custom title feature is enabled and the user is trying to enable another feature */
throw new AndroidRuntimeException("You cannot combine custom titles with other title features");