Merge "Cleanup unused icons on the floating toolbar."
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index c766d93..7d3a41e 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -39,7 +39,6 @@
 import android.graphics.RectF;
 import android.graphics.drawable.Drawable;
 import android.inputmethodservice.ExtractEditText;
-import android.os.Build;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Parcel;
@@ -104,7 +103,6 @@
 
 import com.android.internal.util.ArrayUtils;
 import com.android.internal.util.GrowingArrayUtils;
-import com.android.internal.view.menu.MenuBuilder;
 import com.android.internal.widget.EditableInputConnection;
 
 import java.text.BreakIterator;
@@ -3060,18 +3058,8 @@
         }
 
         private void populateMenuWithItems(Menu menu) {
-            final boolean legacy = mTextView.getContext().getApplicationInfo().targetSdkVersion <
-                    Build.VERSION_CODES.LOLLIPOP;
-            final Context context = !legacy && menu instanceof MenuBuilder ?
-                    ((MenuBuilder) menu).getContext() :
-                    mTextView.getContext();
-            final TypedArray styledAttributes = context.obtainStyledAttributes(
-                    com.android.internal.R.styleable.SelectionModeDrawables);
-
             if (mTextView.canCut()) {
                 menu.add(0, TextView.ID_CUT, 0, com.android.internal.R.string.cut).
-                    setIcon(styledAttributes.getResourceId(
-                            R.styleable.SelectionModeDrawables_actionModeCutDrawable, 0)).
                     setAlphabeticShortcut('x').
                     setShowAsAction(
                             MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
@@ -3079,8 +3067,6 @@
 
             if (mTextView.canCopy()) {
                 menu.add(0, TextView.ID_COPY, 0, com.android.internal.R.string.copy).
-                    setIcon(styledAttributes.getResourceId(
-                            R.styleable.SelectionModeDrawables_actionModeCopyDrawable, 0)).
                     setAlphabeticShortcut('c').
                     setShowAsAction(
                             MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
@@ -3088,23 +3074,17 @@
 
             if (mTextView.canPaste()) {
                 menu.add(0, TextView.ID_PASTE, 0, com.android.internal.R.string.paste).
-                        setIcon(styledAttributes.getResourceId(
-                                R.styleable.SelectionModeDrawables_actionModePasteDrawable, 0)).
                         setAlphabeticShortcut('v').
                         setShowAsAction(
                                 MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
             }
 
             menu.add(0, TextView.ID_SELECT_ALL, 0, com.android.internal.R.string.selectAll).
-                    setIcon(styledAttributes.getResourceId(
-                            R.styleable.SelectionModeDrawables_actionModeSelectAllDrawable, 0)).
                     setAlphabeticShortcut('a').
                     setShowAsAction(
                             MenuItem.SHOW_AS_ACTION_ALWAYS | MenuItem.SHOW_AS_ACTION_WITH_TEXT);
 
             updateReplaceItem(menu);
-
-            styledAttributes.recycle();
         }
 
         private void addIntentMenuItemsForTextProcessing(Menu menu) {