am f95e8c5b: Merge "Fix bug 3400213 - MenuItem ignores String spannable colors" into honeycomb
* commit 'f95e8c5bb24b3e2ea217fb140077526bde5d6dcc':
Fix bug 3400213 - MenuItem ignores String spannable colors
diff --git a/core/java/android/view/MenuInflater.java b/core/java/android/view/MenuInflater.java
index ab515c9..372ac15 100644
--- a/core/java/android/view/MenuInflater.java
+++ b/core/java/android/view/MenuInflater.java
@@ -228,8 +228,8 @@
private boolean itemAdded;
private int itemId;
private int itemCategoryOrder;
- private String itemTitle;
- private String itemTitleCondensed;
+ private CharSequence itemTitle;
+ private CharSequence itemTitleCondensed;
private int itemIconResId;
private char itemAlphabeticShortcut;
private char itemNumericShortcut;
@@ -311,8 +311,8 @@
final int category = a.getInt(com.android.internal.R.styleable.MenuItem_menuCategory, groupCategory);
final int order = a.getInt(com.android.internal.R.styleable.MenuItem_orderInCategory, groupOrder);
itemCategoryOrder = (category & Menu.CATEGORY_MASK) | (order & Menu.USER_MASK);
- itemTitle = a.getString(com.android.internal.R.styleable.MenuItem_title);
- itemTitleCondensed = a.getString(com.android.internal.R.styleable.MenuItem_titleCondensed);
+ itemTitle = a.getText(com.android.internal.R.styleable.MenuItem_title);
+ itemTitleCondensed = a.getText(com.android.internal.R.styleable.MenuItem_titleCondensed);
itemIconResId = a.getResourceId(com.android.internal.R.styleable.MenuItem_icon, 0);
itemAlphabeticShortcut =
getShortcut(a.getString(com.android.internal.R.styleable.MenuItem_alphabeticShortcut));