summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/notification/NotificationStation.java
diff options
context:
space:
mode:
authorLuK1337 <priv.luk@gmail.com>2015-09-19 17:06:42 +0200
committerGerrit Code Review <gerrit@cyanogenmod.org>2015-11-23 11:46:40 -0800
commit178f5e7f72455bbc70b0e67b0b48888d9e058fce (patch)
tree673774642cc1c4093d4258f356992fae5a9bcc47 /src/com/android/settings/notification/NotificationStation.java
parenta3d6b093e78840b7a60295c6d5b9bdc75f9f3833 (diff)
downloadpackages_apps_Settings-178f5e7f72455bbc70b0e67b0b48888d9e058fce.zip
packages_apps_Settings-178f5e7f72455bbc70b0e67b0b48888d9e058fce.tar.gz
packages_apps_Settings-178f5e7f72455bbc70b0e67b0b48888d9e058fce.tar.bz2
Use Theme.SettingsBase for notification log
Change-Id: I9241eb308926048ab4b59c63a4aa3d8c7f3a3209
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>")