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

Commit c861a3dd authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Optionally supress status bar notifications in dnd

If 'allow visual signals -> when the screen is on' is off.

Test: runtest systemui-notification and manual - confirm triggering
dnd hides icons of existing notifications; confirm icons return when dnd
is turned off, verify new icons are hidden when dnd is on, confirm
supressed notification doesn't re-alert when dnd turned off.
Bug: 73455127
Change-Id: If6e5035d6563c70de77604196ea37a16118847a7
parent d28dda31
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2368,7 +2368,7 @@
         obtain user consent to access their location through other means. -->
    <string-array name="config_disabledUntilUsedPreinstalledCarrierApps" translatable="false" />

    <!-- The list of classes that should be added to the notification ranking pipline.
    <!-- The list of classes that should be added to the notification ranking pipeline.
     See {@link com.android.server.notification.NotificationSignalExtractor}
      If you add a new extractor to this list make sure to update
      NotificationManagerService.handleRankingSort()-->
@@ -2380,11 +2380,14 @@
        <!-- depends on AdjustmentExtractor-->
        <item>com.android.server.notification.ValidateNotificationPeople</item>
        <item>com.android.server.notification.PriorityExtractor</item>
        <!-- depends on PriorityExtractor -->
        <item>com.android.server.notification.ZenModeExtractor</item>
        <item>com.android.server.notification.ImportanceExtractor</item>
        <!-- depends on ImportanceExtractor-->
        <item>com.android.server.notification.NotificationIntrusivenessExtractor</item>
        <item>com.android.server.notification.VisibilityExtractor</item>
        <item>com.android.server.notification.BadgeExtractor</item>

    </string-array>

    <!-- Flag indicating that this device does not rotate and will always remain in its default
+5 −0
Original line number Diff line number Diff line
@@ -140,6 +140,11 @@ public class NotificationIconAreaController implements DarkReceiver {
            return false;
        }

        // showAmbient == show in shade but not shelf
        if (!showAmbient && notificationData.shouldSuppressScreenOn(entry.key)) {
            return false;
        }

        return true;
    }

+5 −0
Original line number Diff line number Diff line
@@ -61,4 +61,9 @@ public class BadgeExtractor implements NotificationSignalExtractor {
    public void setConfig(RankingConfig config) {
        mConfig = config;
    }

    @Override
    public void setZenHelper(ZenModeHelper helper) {

    }
}
+5 −0
Original line number Diff line number Diff line
@@ -50,4 +50,9 @@ public class ImportanceExtractor implements NotificationSignalExtractor {
    public void setConfig(RankingConfig config) {
        mConfig = config;
    }

    @Override
    public void setZenHelper(ZenModeHelper helper) {

    }
}
+5 −0
Original line number Diff line number Diff line
@@ -44,4 +44,9 @@ public class NotificationAdjustmentExtractor implements NotificationSignalExtrac
    public void setConfig(RankingConfig config) {
        // config is not used
    }

    @Override
    public void setZenHelper(ZenModeHelper helper) {

    }
}
Loading