summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Bryce Lee <brycelee@google.com> 2016-04-12 12:39:15 -0700
committer Bryce Lee <brycelee@google.com> 2016-04-12 12:39:15 -0700
commitba3d895283ac04aee2ab3f07f0bfc8d07bfc1b51 (patch)
tree567e92bdf2faebe494b3242bb07162f5ba5a6adc
parent1399890890ceb40d42b7dab063c14be3bcbaf6e4 (diff)
Properly check to see if a suppressor is present before returning it.
Bug: 28111086 Change-Id: Ib2cde8269443832e5490906396cd95832c7a146f
-rw-r--r--services/core/java/com/android/server/notification/NotificationManagerService.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index f20d0a15ccbc..a734185fbdbe 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