Loading core/java/android/app/SuggestionsAdapter.java +2 −12 Original line number Diff line number Diff line Loading @@ -68,9 +68,6 @@ class SuggestionsAdapter extends ResourceCursorAdapter { private int mIconName2Col; private int mBackgroundColorCol; // Cached item background color. private int mDefaultBackgroundColor; // This value is stored in SuggestionsAdapter by the SearchDialog to indicate whether // a particular list item should be selected upon the next call to notifyDataSetChanged. // This is used to indicate the index of the "More results..." list item so that when Loading Loading @@ -102,11 +99,6 @@ class SuggestionsAdapter extends ResourceCursorAdapter { Context activityContext = mSearchable.getActivityContext(mContext); mProviderContext = mSearchable.getProviderContext(mContext, activityContext); TypedValue colorValue = new TypedValue(); mProviderContext.getTheme().resolveAttribute( com.android.internal.R.attr.searchWidgetItemBackground, colorValue, true); mDefaultBackgroundColor = mProviderContext.getResources().getColor(colorValue.resourceId); mOutsideDrawablesCache = outsideDrawablesCache; mGlobalSearchMode = globalSearchMode; Loading Loading @@ -303,9 +295,6 @@ class SuggestionsAdapter extends ResourceCursorAdapter { if (mBackgroundColorCol != -1) { backgroundColor = cursor.getInt(mBackgroundColorCol); } if (backgroundColor == 0) { backgroundColor = mDefaultBackgroundColor; } ((SuggestionItemView)view).setColor(backgroundColor); final boolean isHtml = mFormatCol > 0 && "html".equals(cursor.getString(mFormatCol)); Loading Loading @@ -524,6 +513,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter { protected SuggestionItemView(Context context, Cursor cursor) { // Initialize ourselves super(context); mBackgroundColor = 0; // transparent by default. // For our layout use the default list item height from the current theme. TypedValue lineHeight = new TypedValue(); Loading Loading @@ -551,7 +541,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter { @Override public void dispatchDraw(Canvas canvas) { if (!isPressed()) { if (mBackgroundColor != 0 && !isPressed() && !isSelected()) { canvas.drawColor(mBackgroundColor); } super.dispatchDraw(canvas); Loading core/res/res/values/attrs.xml +1 −3 Original line number Diff line number Diff line Loading @@ -82,9 +82,7 @@ <!-- Text color for urls in search suggestions, used by things like global search and the browser. @hide --> <attr name="textColorSearchUrl" format="reference|color" /> <!-- Search widget result item background. --> <attr name="searchWidgetItemBackground" format="reference|color" /> <!-- Search widget expandable result item background. --> <!-- Search widget more corpus result item background. --> <attr name="searchWidgetCorpusItemBackground" format="reference|color" /> <!-- Text color, typeface, size, and style for "large" text. Defaults to primary text color. --> Loading core/res/res/values/colors.xml +0 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,6 @@ <!-- For search-related UIs --> <color name="search_url_text">#7fa87f</color> <color name="search_widget_item_background">@android:color/white</color> <color name="search_widget_corpus_item_background">@android:color/lighter_gray</color> </resources> Loading core/res/res/values/themes.xml +0 −1 Original line number Diff line number Diff line Loading @@ -185,7 +185,6 @@ <item name="preferenceLayoutChild">@android:layout/preference_child</item> <!-- Search widget styles --> <item name="searchWidgetItemBackground">@android:color/search_widget_item_background</item> <item name="searchWidgetCorpusItemBackground">@android:color/search_widget_corpus_item_background</item> </style> Loading Loading
core/java/android/app/SuggestionsAdapter.java +2 −12 Original line number Diff line number Diff line Loading @@ -68,9 +68,6 @@ class SuggestionsAdapter extends ResourceCursorAdapter { private int mIconName2Col; private int mBackgroundColorCol; // Cached item background color. private int mDefaultBackgroundColor; // This value is stored in SuggestionsAdapter by the SearchDialog to indicate whether // a particular list item should be selected upon the next call to notifyDataSetChanged. // This is used to indicate the index of the "More results..." list item so that when Loading Loading @@ -102,11 +99,6 @@ class SuggestionsAdapter extends ResourceCursorAdapter { Context activityContext = mSearchable.getActivityContext(mContext); mProviderContext = mSearchable.getProviderContext(mContext, activityContext); TypedValue colorValue = new TypedValue(); mProviderContext.getTheme().resolveAttribute( com.android.internal.R.attr.searchWidgetItemBackground, colorValue, true); mDefaultBackgroundColor = mProviderContext.getResources().getColor(colorValue.resourceId); mOutsideDrawablesCache = outsideDrawablesCache; mGlobalSearchMode = globalSearchMode; Loading Loading @@ -303,9 +295,6 @@ class SuggestionsAdapter extends ResourceCursorAdapter { if (mBackgroundColorCol != -1) { backgroundColor = cursor.getInt(mBackgroundColorCol); } if (backgroundColor == 0) { backgroundColor = mDefaultBackgroundColor; } ((SuggestionItemView)view).setColor(backgroundColor); final boolean isHtml = mFormatCol > 0 && "html".equals(cursor.getString(mFormatCol)); Loading Loading @@ -524,6 +513,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter { protected SuggestionItemView(Context context, Cursor cursor) { // Initialize ourselves super(context); mBackgroundColor = 0; // transparent by default. // For our layout use the default list item height from the current theme. TypedValue lineHeight = new TypedValue(); Loading Loading @@ -551,7 +541,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter { @Override public void dispatchDraw(Canvas canvas) { if (!isPressed()) { if (mBackgroundColor != 0 && !isPressed() && !isSelected()) { canvas.drawColor(mBackgroundColor); } super.dispatchDraw(canvas); Loading
core/res/res/values/attrs.xml +1 −3 Original line number Diff line number Diff line Loading @@ -82,9 +82,7 @@ <!-- Text color for urls in search suggestions, used by things like global search and the browser. @hide --> <attr name="textColorSearchUrl" format="reference|color" /> <!-- Search widget result item background. --> <attr name="searchWidgetItemBackground" format="reference|color" /> <!-- Search widget expandable result item background. --> <!-- Search widget more corpus result item background. --> <attr name="searchWidgetCorpusItemBackground" format="reference|color" /> <!-- Text color, typeface, size, and style for "large" text. Defaults to primary text color. --> Loading
core/res/res/values/colors.xml +0 −1 Original line number Diff line number Diff line Loading @@ -75,7 +75,6 @@ <!-- For search-related UIs --> <color name="search_url_text">#7fa87f</color> <color name="search_widget_item_background">@android:color/white</color> <color name="search_widget_corpus_item_background">@android:color/lighter_gray</color> </resources> Loading
core/res/res/values/themes.xml +0 −1 Original line number Diff line number Diff line Loading @@ -185,7 +185,6 @@ <item name="preferenceLayoutChild">@android:layout/preference_child</item> <!-- Search widget styles --> <item name="searchWidgetItemBackground">@android:color/search_widget_item_background</item> <item name="searchWidgetCorpusItemBackground">@android:color/search_widget_corpus_item_background</item> </style> Loading