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

Commit 23887b40 authored by Matías Hernández's avatar Matías Hernández Committed by Android (Google) Code Review
Browse files

Merge "NMS: Return only bypass-DND channels for the specified user" into main

parents 46485c17 2c973f4c
Loading
Loading
Loading
Loading
+16 −19
Original line number Diff line number Diff line
@@ -110,8 +110,8 @@ import static android.service.notification.Adjustment.TYPE_PROMOTION;
import static android.service.notification.Adjustment.TYPE_SOCIAL_MEDIA;
import static android.service.notification.Flags.callstyleCallbackApi;
import static android.service.notification.Flags.notificationForceGrouping;
import static android.service.notification.Flags.redactSensitiveNotificationsFromUntrustedListeners;
import static android.service.notification.Flags.redactSensitiveNotificationsBigTextStyle;
import static android.service.notification.Flags.redactSensitiveNotificationsFromUntrustedListeners;
import static android.service.notification.NotificationListenerService.FLAG_FILTER_TYPE_ALERTING;
import static android.service.notification.NotificationListenerService.FLAG_FILTER_TYPE_CONVERSATIONS;
import static android.service.notification.NotificationListenerService.FLAG_FILTER_TYPE_ONGOING;
@@ -248,7 +248,6 @@ import android.content.pm.UserInfo;
import android.content.pm.VersionedPackage;
import android.content.res.Resources;
import android.database.ContentObserver;
import android.graphics.drawable.Icon;
import android.metrics.LogMaker;
import android.net.Uri;
import android.os.Binder;
@@ -373,7 +372,6 @@ import com.android.server.wm.ActivityTaskManagerInternal;
import com.android.server.wm.BackgroundActivityStartCallback;
import com.android.server.wm.WindowManagerInternal;
import java.util.function.BiPredicate;
import libcore.io.IoUtils;
import org.json.JSONException;
@@ -4639,8 +4637,7 @@ public class NotificationManagerService extends SystemService {
            final ArraySet<String> packageNames = new ArraySet<>();
            for (int user : mUm.getProfileIds(userId, false)) {
                List<PackageInfo> pkgs = mPackageManagerClient.getInstalledPackagesAsUser(0, user);
            List<PackageInfo> pkgs = mPackageManagerClient.getInstalledPackagesAsUser(0, userId);
            for (PackageInfo pi : pkgs) {
                String pkg = pi.packageName;
                // If any NotificationChannel for this package is bypassing, the
@@ -4656,7 +4653,7 @@ public class NotificationManagerService extends SystemService {
                    packageNames.add(pkg);
                }
            }
            }
            return new ArrayList<String>(packageNames);
        }