diff --git a/src/com/android/settings/spa/notification/AppNotificationsListModel.kt b/src/com/android/settings/spa/notification/AppNotificationsListModel.kt index 9f949c43ba2..8a534c8b14d 100644 --- a/src/com/android/settings/spa/notification/AppNotificationsListModel.kt +++ b/src/com/android/settings/spa/notification/AppNotificationsListModel.kt @@ -105,7 +105,7 @@ class AppNotificationsListModel( override fun getSpinnerOptions(recordList: List): List { val options = mutableListOf(SpinnerItem.AllApps, SpinnerItem.TurnedOff) - if (repository.isUserUnlocked(recordList[0].app.userId)) { + if (recordList.isNotEmpty() && repository.isUserUnlocked(recordList[0].app.userId)) { options.add(0, SpinnerItem.MostRecent) options.add(1, SpinnerItem.MostFrequent) }