Loading core/java/android/app/NotificationManager.java +4 −3 Original line number Diff line number Diff line Loading @@ -124,9 +124,10 @@ public class NotificationManager int[] idOut = new int[1]; INotificationManager service = getService(); String pkg = mContext.getPackageName(); if((notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0) { // Pedlar: adding support for all apps. Possibility of success? // if((notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0) { updatePackageList(); } // } if (localLOGV) Log.v(TAG, pkg + ": notify(" + id + ", " + notification + ")"); try { service.enqueueNotificationWithTag(pkg, tag, id, notification, idOut); Loading services/java/com/android/server/NotificationManagerService.java +35 −5 Original line number Diff line number Diff line Loading @@ -860,12 +860,27 @@ class NotificationManagerService extends INotificationManager.Stub //updatePackageList(pkg); //Slog.i(TAG, "notification.lights=" // + ((old.notification.lights.flags & Notification.FLAG_SHOW_LIGHTS) != 0)); if ((notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0) { String[] mPackage = findPackage(pkg); boolean flashLight = false; if(mPackage != null) { if(!mPackage[1].equals("none")) flashLight = true; } //if ((notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0) { if(flashLight) { mLights.add(r); updateLightsLocked(); } else { if (old != null && ((old.notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0)) { if (old != null) { // if (old != null // && ((old.notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0)) { String[] mOldPackage = findPackage(old.pkg); boolean flashOldLight = false; if(mOldPackage != null) { if(!mOldPackage[1].equals("none")) flashOldLight = true; } if(flashOldLight) updateLightsLocked(); } } Loading Loading @@ -1100,6 +1115,21 @@ class NotificationManagerService extends INotificationManager.Stub return temp; } public String[] findPackage(String pkg) { String mBaseString = Settings.System.getString(mContext.getContentResolver(), Settings.System.NOTIFICATION_PACKAGE_COLORS); String[] mBaseArray = getArray(mBaseString); for(int i = 0; i < mBaseArray.length; i++) { if(isNull(mBaseArray[i])) { continue; } if(mBaseArray[i].contains(pkg)) { return getPackageInfo(mBaseArray[i]); } } return null; } public class StartTimerClass implements Runnable { private long sleepTimer; Loading Loading
core/java/android/app/NotificationManager.java +4 −3 Original line number Diff line number Diff line Loading @@ -124,9 +124,10 @@ public class NotificationManager int[] idOut = new int[1]; INotificationManager service = getService(); String pkg = mContext.getPackageName(); if((notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0) { // Pedlar: adding support for all apps. Possibility of success? // if((notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0) { updatePackageList(); } // } if (localLOGV) Log.v(TAG, pkg + ": notify(" + id + ", " + notification + ")"); try { service.enqueueNotificationWithTag(pkg, tag, id, notification, idOut); Loading
services/java/com/android/server/NotificationManagerService.java +35 −5 Original line number Diff line number Diff line Loading @@ -860,12 +860,27 @@ class NotificationManagerService extends INotificationManager.Stub //updatePackageList(pkg); //Slog.i(TAG, "notification.lights=" // + ((old.notification.lights.flags & Notification.FLAG_SHOW_LIGHTS) != 0)); if ((notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0) { String[] mPackage = findPackage(pkg); boolean flashLight = false; if(mPackage != null) { if(!mPackage[1].equals("none")) flashLight = true; } //if ((notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0) { if(flashLight) { mLights.add(r); updateLightsLocked(); } else { if (old != null && ((old.notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0)) { if (old != null) { // if (old != null // && ((old.notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0)) { String[] mOldPackage = findPackage(old.pkg); boolean flashOldLight = false; if(mOldPackage != null) { if(!mOldPackage[1].equals("none")) flashOldLight = true; } if(flashOldLight) updateLightsLocked(); } } Loading Loading @@ -1100,6 +1115,21 @@ class NotificationManagerService extends INotificationManager.Stub return temp; } public String[] findPackage(String pkg) { String mBaseString = Settings.System.getString(mContext.getContentResolver(), Settings.System.NOTIFICATION_PACKAGE_COLORS); String[] mBaseArray = getArray(mBaseString); for(int i = 0; i < mBaseArray.length; i++) { if(isNull(mBaseArray[i])) { continue; } if(mBaseArray[i].contains(pkg)) { return getPackageInfo(mBaseArray[i]); } } return null; } public class StartTimerClass implements Runnable { private long sleepTimer; Loading