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

Commit 044e8495 authored by Danny Baumann's avatar Danny Baumann Committed by Steve Kondik
Browse files

Properly respect notification flag SHOW_LIGHTS.

Change-Id: I777bda32bdbd27f317c1f5d6424871f1d6819569
parent aad169af
Loading
Loading
Loading
Loading
+14 −15
Original line number Diff line number Diff line
@@ -124,8 +124,7 @@ public class NotificationManager
        int[] idOut = new int[1];
        INotificationManager service = getService();
        String pkg = mContext.getPackageName();
        if(((notification.flags & Notification.FLAG_ONGOING_EVENT) == 0)
	|| ((notification.flags & Notification.FLAG_FOREGROUND_SERVICE) == 0)) {
        if ((notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0) {
            updatePackageList();
        }
        if (localLOGV) Log.v(TAG, pkg + ": notify(" + id + ", " + notification + ")");
+7 −10
Original line number Diff line number Diff line
@@ -1103,17 +1103,14 @@ public class NotificationManagerService extends INotificationManager.Stub

    private boolean checkLight(Notification notification, String pkg) {
        String[] mPackage = findPackage(pkg);
        boolean flashLight = true;
        if(((notification.flags & Notification.FLAG_ONGOING_EVENT) != 0)
                || ((notification.flags & Notification.FLAG_FOREGROUND_SERVICE) != 0) ) {
            flashLight = false;
        } else if(mPackage != null) {
            if(mPackage[1].equals("none"))
                flashLight = false;
        if ((notification.flags & Notification.FLAG_SHOW_LIGHTS) == 0) {
            return false;
        }
        return flashLight;
        if (mPackage != null && mPackage[1].equals("none")) {
            return false;
        }
        return true;
    }


    private void sendAccessibilityEvent(Notification notification, CharSequence packageName) {
        AccessibilityManager manager = AccessibilityManager.getInstance(mContext);