From 3540e1d9bbbbc21da22426bb7b68ac9d8a3b0136 Mon Sep 17 00:00:00 2001 From: Simon Marquis Date: Sun, 10 Nov 2024 10:33:45 +0100 Subject: [PATCH] Replace `Enum.values()` with recommended `Enum.entries` --- app/src/main/java/fr/smarquis/sleeptimer/SleepNotification.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/fr/smarquis/sleeptimer/SleepNotification.kt b/app/src/main/java/fr/smarquis/sleeptimer/SleepNotification.kt index 961e903..b5d4364 100644 --- a/app/src/main/java/fr/smarquis/sleeptimer/SleepNotification.kt +++ b/app/src/main/java/fr/smarquis/sleeptimer/SleepNotification.kt @@ -40,7 +40,7 @@ object SleepNotification { ; companion object { - fun parse(value: String?): Action? = values().firstOrNull { it.value == value } + fun parse(value: String?): Action? = entries.firstOrNull { it.value == value } } fun intent(context: Context): Intent = Intent(context, SleepTileService::class.java).setAction(value)