projects
/
GitHub
/
LineageOS
/
android_hardware_samsung.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
577494c
)
SamsungDAP: Clamp DolbyCore.getProfile()'s returned value
author
Tim Zimmermann
<tim@linux4.de>
Sat, 26 Mar 2022 07:03:35 +0000
(08:03 +0100)
committer
LuK1337
<priv.luk@gmail.com>
Sat, 26 Mar 2022 08:07:27 +0000
(09:07 +0100)
When dolby was never enabled before this would return -1 resulting in a
crash when adding the QS Tile.
Change-Id: I9ce49309aa54f4e954bd3917bfc737811a152a55
dap/src/org/lineageos/dap/DolbyCore.kt
patch
|
blob
|
blame
|
history
diff --git
a/dap/src/org/lineageos/dap/DolbyCore.kt
b/dap/src/org/lineageos/dap/DolbyCore.kt
index 82c9a1b29067b6c0782a5a508a23bbb6c19ed6e5..b287f18a3c3cb8d97cf0769c1a1635aee5514dc2 100644
(file)
--- a/
dap/src/org/lineageos/dap/DolbyCore.kt
+++ b/
dap/src/org/lineageos/dap/DolbyCore.kt
@@
-46,7
+46,7
@@
object DolbyCore {
fun getProfile(): Int {
val out = intArrayOf(PROFILE_AUTO)
audioEffect?.getParameter(EFFECT_PARAM_PROFILE, out)
- return out.first()
+ return out.first()
.coerceIn(PROFILE_AUTO, PROFILE_SPACIAL_AUDIO)
}
fun getProfileName(context: Context): String {