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

Commit dc5e9a5e 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: d6ed513d am: dec8d4af am: e39d8ac7

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



Change-Id: I2039b387602598ecdfcce53858c4c9c486bc2574
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents fa3f3d56 e39d8ac7
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;