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

Commit 2764aa6b authored by Beverly Tai's avatar Beverly Tai Committed by Android (Google) Code Review
Browse files

Merge "Add Coordinators to the NewNotifPipeline"

parents 57253a47 af16ee0c
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -65,8 +65,18 @@ public interface NotificationLockscreenUserManager {

    boolean needsRedaction(NotificationEntry entry);

    /**
     * Has the given user chosen to allow their private (full) notifications to be shown even
     * when the lockscreen is in "public" (secure & locked) mode?
     */
    boolean userAllowsPrivateNotificationsInPublic(int currentUserId);

    /**
     * Has the given user chosen to allow notifications to be shown even when the lockscreen is in
     * "public" (secure & locked) mode?
     */
    boolean userAllowsNotificationsInPublic(int userId);

    /** Notified when the current user changes. */
    interface UserChangedListener {
        void onUserChanged(int userId);
+1 −1
Original line number Diff line number Diff line
@@ -435,7 +435,7 @@ public class NotificationLockscreenUserManagerImpl implements
     * Has the given user chosen to allow notifications to be shown even when the lockscreen is in
     * "public" (secure & locked) mode?
     */
    private boolean userAllowsNotificationsInPublic(int userHandle) {
    public boolean userAllowsNotificationsInPublic(int userHandle) {
        if (isCurrentProfile(userHandle) && userHandle != mCurrentUserId) {
            return true;
        }
+5 −2
Original line number Diff line number Diff line
@@ -37,6 +37,9 @@ import javax.inject.Inject;
import javax.inject.Singleton;

/** Component which manages the various reasons a notification might be filtered out.*/
// TODO: delete NotificationFilter.java after migrating to new NotifPipeline b/145659174.
//  Notification filtering is taken care of across the different Coordinators (mostly
//  KeyguardCoordinator.java)
@Singleton
public class NotificationFilter {

@@ -109,7 +112,7 @@ public class NotificationFilter {
            return true;
        }

        if (entry.isSuspended()) {
        if (entry.getRanking().isSuspended()) {
            return true;
        }

+6 −2
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ package com.android.systemui.statusbar.notification.collection;

import android.annotation.Nullable;

import com.android.internal.annotations.VisibleForTesting;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@@ -34,7 +36,8 @@ public class GroupEntry extends ListEntry {
    private final List<NotificationEntry> mUnmodifiableChildren =
            Collections.unmodifiableList(mChildren);

    GroupEntry(String key) {
    @VisibleForTesting
    public GroupEntry(String key) {
        super(key);
    }

@@ -52,7 +55,8 @@ public class GroupEntry extends ListEntry {
        return mUnmodifiableChildren;
    }

    void setSummary(@Nullable NotificationEntry summary) {
    @VisibleForTesting
    public void setSummary(@Nullable NotificationEntry summary) {
        mSummary = summary;
    }

+4 −1
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ package com.android.systemui.statusbar.notification.collection;

import android.annotation.Nullable;

import com.android.internal.annotations.VisibleForTesting;

/**
 * Abstract superclass for top-level entries, i.e. things that can appear in the final notification
 * list shown to users. In practice, this means either GroupEntries or NotificationEntries.
@@ -49,7 +51,8 @@ public abstract class ListEntry {
        return mParent;
    }

    void setParent(@Nullable GroupEntry parent) {
    @VisibleForTesting
    public void setParent(@Nullable GroupEntry parent) {
        mParent = parent;
    }

Loading