Correct colors for icons in "Search settings" for dark theme am: 1ae31cc4e3 am: 6d51e11f9a
am: e1ca7a86a3

Change-Id: Ieb8fcf9795da04c2b8b29039add0c153d56b2bf5
diff --git a/src/com/android/settings/intelligence/search/query/CursorToSearchResultConverter.java b/src/com/android/settings/intelligence/search/query/CursorToSearchResultConverter.java
index dad9f14..a57f510 100644
--- a/src/com/android/settings/intelligence/search/query/CursorToSearchResultConverter.java
+++ b/src/com/android/settings/intelligence/search/query/CursorToSearchResultConverter.java
@@ -27,7 +27,9 @@
 import android.os.BadParcelableException;
 import android.text.TextUtils;
 import android.util.Log;
+import android.view.ContextThemeWrapper;
 
+import com.android.settings.intelligence.R;
 import com.android.settings.intelligence.search.ResultPayload;
 import com.android.settings.intelligence.search.ResultPayloadUtils;
 import com.android.settings.intelligence.search.SearchResult;
@@ -162,7 +164,11 @@
         Context packageContext = contextMap.get(pkgName);
         if (packageContext == null) {
             try {
-                packageContext = mContext.createPackageContext(pkgName, 0);
+                final Context themedAppContext = new ContextThemeWrapper(
+                        mContext, R.style.Theme_Settings);
+                packageContext = new ContextThemeWrapper(
+                        themedAppContext.createPackageContext(pkgName, 0),
+                        themedAppContext.getTheme());
                 contextMap.put(pkgName, packageContext);
             } catch (PackageManager.NameNotFoundException e) {
                 Log.e(TAG, "Cannot create Context for package: " + pkgName);