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

Commit 0833082c authored by Daniel Sandler's avatar Daniel Sandler Committed by Android (Google) Code Review
Browse files

Merge "Stop showing ADB and MTP/PTP/USB notifications at the top."

parents 970de33c 49a2ad1f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -79,6 +79,7 @@ public class NotificationManagerService extends INotificationManager.Stub
    private static final long[] DEFAULT_VIBRATE_PATTERN = {0, 250, 250, 250};

    private static final int DEFAULT_STREAM_TYPE = AudioManager.STREAM_NOTIFICATION;
    private static final boolean SCORE_ONGOING_HIGHER = false;

    final Context mContext;
    final IActivityManager mAm;
@@ -720,7 +721,7 @@ public class NotificationManagerService extends INotificationManager.Stub
        // Migrate notification flags to scores
        if (0 != (notification.flags & Notification.FLAG_HIGH_PRIORITY)) {
            if (notification.priority < Notification.PRIORITY_MAX) notification.priority = Notification.PRIORITY_MAX;
        } else if (0 != (notification.flags & Notification.FLAG_ONGOING_EVENT)) {
        } else if (SCORE_ONGOING_HIGHER && 0 != (notification.flags & Notification.FLAG_ONGOING_EVENT)) {
            if (notification.priority < Notification.PRIORITY_HIGH) notification.priority = Notification.PRIORITY_HIGH;
        }
        
+2 −0
Original line number Diff line number Diff line
@@ -591,6 +591,7 @@ public class UsbDeviceManager {
                    notification.defaults = 0; // please be quiet
                    notification.sound = null;
                    notification.vibrate = null;
                    notification.priority = Notification.PRIORITY_MIN;

                    Intent intent = Intent.makeRestartActivityTask(
                            new ComponentName("com.android.settings",
@@ -624,6 +625,7 @@ public class UsbDeviceManager {
                    notification.defaults = 0; // please be quiet
                    notification.sound = null;
                    notification.vibrate = null;
                    notification.priority = Notification.PRIORITY_MIN;

                    Intent intent = Intent.makeRestartActivityTask(
                            new ComponentName("com.android.settings",