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

Commit 3a80728c authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Limit the number of concurrently snoozed notifications" into tm-dev am:...

Merge "Limit the number of concurrently snoozed notifications" into tm-dev am: 5f5220c3 am: 826e83e1

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19205939



Change-Id: I128a0efa8ce57104cbea8b11d3e47b9d95dafa35
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 49768370 826e83e1
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -122,6 +122,15 @@ public final class SnoozeHelper {
        return true;
    }

    protected boolean canSnooze(int numberToSnooze) {
        synchronized (mLock) {
            if ((mPackages.size() + numberToSnooze) > CONCURRENT_SNOOZE_LIMIT) {
                return false;
            }
        }
        return true;
    }

    @NonNull
    protected Long getSnoozeTimeForUnpostedNotification(int userId, String pkg, String key) {
        Long time = null;