Properly check to see if a suppressor is present before returning it.

Bug: 28111086
Change-Id: Ib2cde8269443832e5490906396cd95832c7a146f
This commit is contained in:
Bryce Lee
2016-04-12 12:39:15 -07:00
parent 1399890890
commit ba3d895283

View File

@@ -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