dolby: Restore current profile _after_ resetting profiles

Ensure to end the onBootCompleted routine with the correct profile set.

Change-Id: I2d5f74a7c0145af2f9d064cd98fa2dc70e5a7acd
This commit is contained in:
Adithya R
2024-07-18 07:01:34 +05:30
committed by Joey Huab
parent 71c471385e
commit f920f15040

View File

@@ -100,7 +100,6 @@ internal class DolbyController private constructor(
// Restore our main settings
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
dsOn = prefs.getBoolean(DolbyConstants.PREF_ENABLE, true)
setCurrentProfile()
context.resources.getStringArray(R.array.dolby_profile_values)
.map { it.toInt() }
@@ -110,6 +109,9 @@ internal class DolbyController private constructor(
// Now restore our profile-specific settings
restoreSettings(profile)
}
// Finally restore the current profile.
setCurrentProfile()
}
private fun restoreSettings(profile: Int) {