Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c262496 authored by Pedlar's avatar Pedlar
Browse files

All applications will flash that aren't ongoing/persistint, and automatically add themselves

parent 8cee92ab
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -124,9 +124,8 @@ public class NotificationManager
        int[] idOut = new int[1];
        INotificationManager service = getService();
        String pkg = mContext.getPackageName();
//	Pedlar: adding support for all apps. Possibility of success?
//        if((notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0) {
        if(((notification.flags & Notification.FLAG_ONGOING_EVENT) == 0)) {
        if(((notification.flags & Notification.FLAG_ONGOING_EVENT) == 0)
	|| ((notification.flags & Notification.FLAG_FOREGROUND_SERVICE) == 0)) {
		updatePackageList();
        }
        if (localLOGV) Log.v(TAG, pkg + ": notify(" + id + ", " + notification + ")");
+18 −32
Original line number Diff line number Diff line
@@ -1240,23 +1240,10 @@ class NotificationManagerService extends INotificationManager.Stub
                	ledOnMS = mDefaultNotificationLedOn;
                	ledOffMS = mDefaultNotificationLedOff;
            	}
	    	//Possible Cleaner way?
            	//String[] mPackageInfo = findPackage(mLedNotification.pkg);
            	//if(mPackageInfo != null) {
            	//		ledARGB = Color.parseColor(mPackageInfo[1]);
    		//		ledOffMS = Integer.parseInt(mPackageInfo[2]);
		//}
            	if(mPackages != null) {
            		int i = 0;
            		for(i = 0; i < mPackages.length; i++) {
            			String[] mPackageInfo = getPackageInfo(mPackages[i]);
            			if(mPackageInfo == null) {
            				continue;
            			}
            			if(mPackageInfo[0].matches(mLedNotification.pkg)) {
					if(mPackageInfo[1].equals("none"))
						break;

		String[] mPackageInfo = findPackage(mLedNotification.pkg);
                if(mPackageInfo != null) {
			if(!mPackageInfo[1].equals("none")) {
				if(mPackageInfo[1].equals("random")) {
					Random generator = new Random();
					int x = generator.nextInt(colorList.length - 1);
@@ -1271,7 +1258,6 @@ class NotificationManagerService extends INotificationManager.Stub
				}
			}
		}
            	}

          	if(mRandomColor == 1) {
			//Lets make this intresting...