From 88b86634841e074a195bbf92134a9f66df5454ef Mon Sep 17 00:00:00 2001 From: "Alinson S. Xavier" Date: Sun, 2 Jan 2022 11:28:27 -0600 Subject: [PATCH] Remove pref_led_notifications --- .../uhabits/notifications/AndroidNotificationTray.kt | 4 ---- .../uhabits/preferences/SharedPreferencesStorage.kt | 2 -- uhabits-android/src/main/res/xml/preferences.xml | 7 ------- .../org/isoron/uhabits/core/preferences/Preferences.kt | 9 --------- .../isoron/uhabits/core/preferences/PreferencesTest.kt | 3 --- 5 files changed, 25 deletions(-) diff --git a/uhabits-android/src/main/java/org/isoron/uhabits/notifications/AndroidNotificationTray.kt b/uhabits-android/src/main/java/org/isoron/uhabits/notifications/AndroidNotificationTray.kt index 3721f04d5..07b215440 100644 --- a/uhabits-android/src/main/java/org/isoron/uhabits/notifications/AndroidNotificationTray.kt +++ b/uhabits-android/src/main/java/org/isoron/uhabits/notifications/AndroidNotificationTray.kt @@ -25,7 +25,6 @@ import android.app.NotificationChannel import android.app.NotificationManager import android.content.Context import android.graphics.BitmapFactory.decodeResource -import android.graphics.Color import android.os.Build import android.os.Build.VERSION.SDK_INT import android.util.Log @@ -150,9 +149,6 @@ class AndroidNotificationTray if (!disableSound) builder.setSound(ringtoneManager.getURI()) - if (preferences.shouldMakeNotificationsLed()) - builder.setLights(Color.RED, 1000, 1000) - if (SDK_INT < Build.VERSION_CODES.S) { val snoozeAction = Action( R.drawable.ic_action_snooze, diff --git a/uhabits-android/src/main/java/org/isoron/uhabits/preferences/SharedPreferencesStorage.kt b/uhabits-android/src/main/java/org/isoron/uhabits/preferences/SharedPreferencesStorage.kt index ec78e5d6b..0e019be0c 100644 --- a/uhabits-android/src/main/java/org/isoron/uhabits/preferences/SharedPreferencesStorage.kt +++ b/uhabits-android/src/main/java/org/isoron/uhabits/preferences/SharedPreferencesStorage.kt @@ -90,8 +90,6 @@ class SharedPreferencesStorage preferences.isMidnightDelayEnabled = getBoolean(key, false) "pref_sticky_notifications" -> preferences.setNotificationsSticky(getBoolean(key, false)) - "pref_led_notifications" -> - preferences.setNotificationsLed(getBoolean(key, false)) "pref_unknown_enabled" -> { preferences.areQuestionMarksEnabled = getBoolean(key, false) } diff --git a/uhabits-android/src/main/res/xml/preferences.xml b/uhabits-android/src/main/res/xml/preferences.xml index 89ab445f9..5da126053 100644 --- a/uhabits-android/src/main/res/xml/preferences.xml +++ b/uhabits-android/src/main/res/xml/preferences.xml @@ -99,13 +99,6 @@ android:title="@string/sticky_notifications" app:iconSpaceReserved="false" /> - -