From 7612790c37f6254f79d8b9ef221cb668a361ab64 Mon Sep 17 00:00:00 2001 From: Naveen Singh Date: Fri, 2 Jan 2026 17:12:20 +0530 Subject: [PATCH] fix: prevent cached preference after reboot Refs: https://github.com/FossifyOrg/Keyboard/issues/372 --- CHANGELOG.md | 3 +++ .../org/fossify/keyboard/helpers/KeyboardFeedbackManager.kt | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a70e8f2..e65f1adc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Fixed +- Fixed an issue where sound/vibration preferences were ignored after reboot ([#372]) ## [1.8.0] - 2025-12-29 ### Added @@ -150,6 +152,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#274]: https://github.com/FossifyOrg/Keyboard/issues/274 [#335]: https://github.com/FossifyOrg/Keyboard/issues/335 [#356]: https://github.com/FossifyOrg/Keyboard/issues/356 +[#372]: https://github.com/FossifyOrg/Keyboard/issues/372 [Unreleased]: https://github.com/FossifyOrg/Keyboard/compare/1.8.0...HEAD [1.8.0]: https://github.com/FossifyOrg/Keyboard/compare/1.7.0...1.8.0 diff --git a/app/src/main/kotlin/org/fossify/keyboard/helpers/KeyboardFeedbackManager.kt b/app/src/main/kotlin/org/fossify/keyboard/helpers/KeyboardFeedbackManager.kt index 5655a1ff..aea444e8 100644 --- a/app/src/main/kotlin/org/fossify/keyboard/helpers/KeyboardFeedbackManager.kt +++ b/app/src/main/kotlin/org/fossify/keyboard/helpers/KeyboardFeedbackManager.kt @@ -14,7 +14,9 @@ import org.fossify.keyboard.extensions.safeStorageContext */ class KeyboardFeedbackManager(private val context: Context) { - private val config = context.safeStorageContext.config + private val config: Config + get() = context.safeStorageContext.config + private val audioManager by lazy { context.getSystemService(Context.AUDIO_SERVICE) as AudioManager }