From ba3d895283ac04aee2ab3f07f0bfc8d07bfc1b51 Mon Sep 17 00:00:00 2001 From: Bryce Lee Date: Tue, 12 Apr 2016 12:39:15 -0700 Subject: [PATCH] Properly check to see if a suppressor is present before returning it. Bug: 28111086 Change-Id: Ib2cde8269443832e5490906396cd95832c7a146f --- .../android/server/notification/NotificationManagerService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index f20d0a15ccbc4..a734185fbdbea 100644 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -2009,7 +2009,7 @@ public class NotificationManagerService extends SystemService { @Override public ComponentName getEffectsSuppressor() { enforceSystemOrSystemUIOrVolume("INotificationManager.getEffectsSuppressor"); - return mEffectsSuppressors.get(0); + return !mEffectsSuppressors.isEmpty() ? mEffectsSuppressors.get(0) : null; } @Override