summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/notification/NotificationStation.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/settings/notification/NotificationStation.java')
-rw-r--r--src/com/android/settings/notification/NotificationStation.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/com/android/settings/notification/NotificationStation.java b/src/com/android/settings/notification/NotificationStation.java
index a54e3dd..fa6b171 100644
--- a/src/com/android/settings/notification/NotificationStation.java
+++ b/src/com/android/settings/notification/NotificationStation.java
@@ -27,6 +27,8 @@ import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.drawable.Drawable;
+import android.graphics.ColorFilter;
+import android.graphics.LightingColorFilter;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
@@ -74,6 +76,7 @@ public class NotificationStation extends SettingsPreferenceFragment {
private PackageManager mPm;
private INotificationManager mNoMan;
+ private ColorFilter mFilter;
private Runnable mRefreshListRunnable = new Runnable() {
@Override
@@ -128,6 +131,15 @@ public class NotificationStation extends SettingsPreferenceFragment {
}
@Override
+ public void onCreate(Bundle savedInstanceState) {
+ logd("onCreate(%s)", savedInstanceState);
+ super.onCreate(savedInstanceState);
+
+ int colorPrimaryDark = getResources().getColor(R.color.theme_primary_dark);
+ mFilter = new LightingColorFilter(colorPrimaryDark, colorPrimaryDark);
+ }
+
+ @Override
public void onDetach() {
try {
mListener.unregisterAsSystemService();
@@ -275,13 +287,16 @@ public class NotificationStation extends SettingsPreferenceFragment {
private Drawable loadIconDrawable(String pkg, int userId, int resId) {
Resources r = getResourcesForUserPackage(pkg, userId);
+ Drawable d;
if (resId == 0) {
return null;
}
try {
- return r.getDrawable(resId, null);
+ d = r.getDrawable(resId, null).mutate();
+ d.setColorFilter(mFilter);
+ return d;
} catch (RuntimeException e) {
Log.w(TAG, "Icon not found in "
+ (pkg != null ? resId : "<system>")