Correct colors for icons in "Search settings" for dark theme am: 1ae31cc4e3
am: 6d51e11f9a
Change-Id: I67ee1c832df9cc2f0c434ad5afac45b567bd9fa7
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);